Page 1 of 1

Flowcode V9 new component just been added

Posted: Wed Dec 02, 2020 11:04 pm
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 9729 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.

Re: Flowcode V9 new component just been added

Posted: Thu Dec 03, 2020 2:48 pm
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.

Re: Flowcode V9 new component just been added

Posted: Thu Dec 03, 2020 5:43 pm
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.

Re: Flowcode V9 new component just been added

Posted: Fri Dec 04, 2020 1:09 pm
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.

Re: Flowcode V9 new component just been added

Posted: Fri Dec 04, 2020 2:06 pm
by katela
This is really going to be a very useful component.
Big up to the Dev team.