in C we can use this command to check Data in UART receive buffer is ready for reading,
" if (UART1 Data Ready () ==1 "
but how we can do this in flowcode??
how to check UART Data buffer?
- 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: how to check UART Data buffer?
Hello,
The easiest way is to use a RX interrupt to put the data bytes into a circular buffer as it comes in. You can then poll the buffer as part of your main program. This way you get far more data buffering then the UART hardware can provide.
Here's an example.
https://www.matrixtsl.com/wiki/images/6 ... uffer.fcfx
I'm guessing this is from Arduino C.in C we can use this command to check Data in UART receive buffer is ready for reading,
The easiest way is to use a RX interrupt to put the data bytes into a circular buffer as it comes in. You can then poll the buffer as part of your main program. This way you get far more data buffering then the UART hardware can provide.
Here's an example.
https://www.matrixtsl.com/wiki/images/6 ... uffer.fcfx
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