I have tried a new component that has been added today to V9.
It's a Timer UART that uses timer2 interrupt:
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.
Flowcode V9 new component just been added
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- 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
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: Flowcode V9 new component just been added
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.
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
- 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
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- 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
This is really going to be a very useful component.
Big up to the Dev team.
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
Website: https://www.studentcompanion.co.za/cate ... e-for-pic/
YouTube Tutorials: https://www.youtube.com/user/StudentCompanionSA