1. I have a application in which I have 30 inputs/30 outputs/4 adc & uart to send data to PC.
Data send to PC continuously -> 30 input & 4 adc data (total 20 bytes with some header.
Data receive from PC anytime -> 10 bytes (to set/reset outputs)
I am using Atmega1280v , with 8Mhz crystal, Avrstudio 6.
2. I need to achieve maximum throughput in the system i.e to send data at maximum rate to PC as possible/
What I have done:
1. Enable receive interrupt & set a global flag as soon as 10 byte user data is received. If global flag is set then receptin is disabled unless main clears it
2. Read 30 input data & 4 adc data & send it to PC.
3. Check if global recive flag is set, set/reset output & clear the flag to enable reception.
4. Go to step 2./
Is there any faster way to do it, my objective is to maximize throughput i.e send data at maximum rate as possible?
Data send to PC continuously -> 30 input & 4 adc data (total 20 bytes with some header.
Data receive from PC anytime -> 10 bytes (to set/reset outputs)
I am using Atmega1280v , with 8Mhz crystal, Avrstudio 6.
2. I need to achieve maximum throughput in the system i.e to send data at maximum rate to PC as possible/
What I have done:
1. Enable receive interrupt & set a global flag as soon as 10 byte user data is received. If global flag is set then receptin is disabled unless main clears it
2. Read 30 input data & 4 adc data & send it to PC.
3. Check if global recive flag is set, set/reset output & clear the flag to enable reception.
4. Go to step 2./
Is there any faster way to do it, my objective is to maximize throughput i.e send data at maximum rate as possible?