| ??? 12/30/03 15:49 Read: times |
#61598 - RE: Atomic 16bit read Responding to: ???'s previous message |
Anyhow what you are doing will fail since you have no "handle oscillations across the border" routine. You mean 16-bit overflow? I can "guess" that in the PC. With my sample rate I don't expect increments higher than 10-20 units between following samples, in disastrous scenarios maybe 500 units diffs could appear. If I detect the value has changed by over 60.000, my best bet is the 16-bit counter overflowed and the signed 32-bit counterpart in PC should react accordingly: 65530->8 means just "65543" and 4->65534 means "-2". My only worry on uC side is to send the valid 16-bit value. |



