Hardware Reference
In-Depth Information
Table 1-1. Bias Test Results
Divisor
Results
Time-outs
Errors
2
1
17
103
3
48
17
63
4
30
25
56
5
49
14
63
6
45
20
52
7
60
16
47
8
41
20
56
9
42
17
62
10
39
22
53
11
40
14
72
12
43
13
71
13
47
10
75
14
32
19
67
15
28
23
63
16
38
16
69
17
33
14
81
18
34
13
82
19
31
16
75
20
22
18
81
Using no bias at all, no successful reads result (which prompted the idea of applying
a bias). Using a divisor of 2 applies too much adjustment, as can be seen by the low
number of results (1). Increasing the divisor to the value 3 or more produced a much
higher success rate, near 48, which is almost 10 reports per minute. Setting the divisor to 3
seems to yield the most repeatable results overall.
It is uncertain from the datasheets how rapidly the sensor can be requeried. The
program takes the conservative approach of pausing 2 seconds between each sensor read
attempt or waiting 5 seconds when a time-out has occurred.
The program reports an error when the checksum does not match. Time-outs occur
if the code gets stuck waiting for the signal to go low, for too long. This can happen if the
program misses a critical event because of preemptive scheduling. It sometimes happens
that the high-to-low-to-high event can occur without the program ever seeing it. If the
going-low event takes too long, the program performs a longjmp into the main loop, to
allow a retry.
 
 
Search WWH ::




Custom Search