F
Fred Bloggs
I say 'sort of' because the input I have is not true reflected binary
The direct approaches are uninteresting- like the dumb C stuff that
presumably uses 16 I/O which seems burdensome on the embedded flea power
hardware. The answer in terms of an efficient solution is not only pat
but also obvious if you can recognize the analogy with another
well-known method...
Gray code. The input is a wind direction sensor with eight discrete
positions. They are activated by a small magnet which triggers either
one or two sensors at any time. Thus the eight sensors produce the
following sequence:
00000001
00000011
00000010
00000110
00000100
00001100
00001000
00011000
00010000
00110000
00100000
01100000
01000000
11000000
10000000
10000001
What logic do I need to convert these 16 values to a 4-bit binary
number.
Thanks for your attention.
The direct approaches are uninteresting- like the dumb C stuff that
presumably uses 16 I/O which seems burdensome on the embedded flea power
hardware. The answer in terms of an efficient solution is not only pat
but also obvious if you can recognize the analogy with another
well-known method...