Flowcode V9 new component just been added

Tips, Tricks and methods for programming, learn ways of making your programming life easier, and share your knowledge with others.

Moderators: Benj, Mods

Post Reply
medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Flowcode V9 new component just been added

Post by medelec35 »

I have tried a new component that has been added today to V9.
It's a Timer UART that uses timer2 interrupt:
Timer UART.png
Timer UART.png (10.08 KiB) Viewed 6133 times
As it's timer interrupt based, that means it will work perfectly on any pin even if not got mapping available.
Unlike the original software UART, the new version captures perfectly in RX mode and works perfectly in software mode even if using an additional fast timer interrupt for other purposes.
An example flowchart and additional information can be found here.
note: To set the baud rate I used my calculator from here.
The interrupt frequency is the baud rate.
If you don't have excel, there is an app here that will work nicely.
Martin

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Flowcode V9 new component just been added

Post by Benj »

Thanks Martin,

Glad your liking the new component. It's a bit different to the standard UART component but hopefully should provide a more stable and reliable software UART option. The nice thing about it is that it can now send and receive data at the same time as well as being none blocking for your application.

Any problems let me know.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Flowcode V9 new component just been added

Post by medelec35 »

Thanks Ben,
Yes loving the new component.
It's one I wished I had a few years ago.
The software TX & RX works much better than I thought it could.
Was pleasantly surprised.
Does it work with just PIC or can work with Arduino's etc?
I know timer interrupts can be different for the different types of target devices.
Martin

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Flowcode V9 new component just been added

Post by Benj »

Hi Martin,

Yes should work on any of the targets as long as you can create a timer interrupt at the required baud rate. I dare say you could also use it with an INT type external interrupt if you can generate the correct input frequency.

The RX and TX buffers are very useful and have given me ideas of where to try and take the standard UART component.

User avatar
katela
Posts: 10
Joined: Thu Aug 15, 2013 8:04 am
Location: South Africa
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: Flowcode V9 new component just been added

Post by katela »

This is really going to be a very useful component.
Big up to the Dev team.
Free online Microcontroller Tutorials & Projects for beginners to advanced.
Website: https://www.studentcompanion.co.za/cate ... e-for-pic/
YouTube Tutorials: https://www.youtube.com/user/StudentCompanionSA

Post Reply