| ??? 12/31/03 15:55 Read: times |
#61672 - RE: Atomic 16bit read Responding to: ???'s previous message |
"are so high freq that we will miss readouts of most of them and should consider these we read as completely random string of zeros and ones"
Not with my algorithm. I compare always the last reading with the current reading and create a table with this 16 states which increment or decrement the counter or do nothing. So on a real reading you should see: 0-0-0-0-1-1-1-1-3-3-3-3-2-2-2-2-0 a counter value of 0-0-0-0-1-1-1-1-2-2-2-2-3-3-3-3-4 and so on. But a oscillation looks like 1-1-1-1-3-1-3-1-3-1-3-1-3-3-3-3 if you are in between step 1 and 3 But before the oscillation a clean "1" can be read and after it a clean "3". So always the clean "3" was reached also the right counter value n+1 was given. And during the oscillation the values n and n+1 are seen, but not so fast as the oscillation, only so fast as the sample time. Since on all digital measurement an error of 1 digit must be accepted, the variation of 1 digit was o.k. Peter |



