| ??? 01/30/06 14:44 Read: times |
#108719 - a simplification Responding to: ???'s previous message |
I was thinking of using the ring buffer technique with about 10bytes storage, when the value of the buffer was down to about 5bytes I would fill it up again.
Sinmce the simplification of ISRs is alway important, make the size of the ring buffer size a power of 2> instead of .... offset++
if (offset == size)
{
offset = 0;
}
this becomes
.... offset++
offset &= (size - 1)have a look at the generated assembler in both cases.
Erik |
| Topic | Author | Date |
| Sending a large array out a serial port | 01/01/70 00:00 | |
| Solved as per above | 01/01/70 00:00 | |
| state it more clearly | 01/01/70 00:00 | |
| More Clearly Defined Question | 01/01/70 00:00 | |
| State Machine | 01/01/70 00:00 | |
| State Machine | 01/01/70 00:00 | |
| data consistency | 01/01/70 00:00 | |
| ISR Calculating the CRC | 01/01/70 00:00 | |
| A possibly irelevant thought... | 01/01/70 00:00 | |
| Protocol Intercharacter Timeout | 01/01/70 00:00 | |
| a simplification | 01/01/70 00:00 | |
Buffer size | 01/01/70 00:00 |



