Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Hi,
Can any one help me to solve PIC32 RX ISR for unknown data length.
Thanks in advance
regards
Vinoth M.
you could use a ring buffer, e.g.
https://www.embedded.com/electronics-blogs/embedded-round-table/4419407/The-ring-buffer
even if data flow speed is variable so long as you can empty the buffer before it becomes full there is no problem
what happens when you get overflow (buffer full) ? could you
1. thorw away the oldest data?
2. ignore some of the imcomming data?
3. implement hardware or software flow control?
what processing do you have to do on the incomming data?
HI,
I want to receive data from modbus simulator and the same data is to be transmitting to same uart port.
what speed are you receiving/transmitting data?
if it is just a question of receiving data and transmitting it onwards do you need to buffer it at all?
e.g. in an interrupt service routine receive a character and retransmit it (ssuming you are transmitting at the same or faster speed than receiving)
if you need to buffer data and do some processing could you double buffer it, e.g.
1. using DMA receive data into one buffer
while
2. processing data in second buffer and then transmitting it?