|
by George Martin
Start ý Stating
Our Case ý Working the Wiring ý A
Case Study in Timer Interrupts ý Sources
and PDF
STATING THE CASE
For the first example of unsigned number
use, letýs work with the following assumptions. You have a 12-bit
A/D converter that is measuring a real-world parameter that is always
positive, such as oil pressure in an engine. The signal conditioning
electronics produce a voltage ranging from 0 to 5 V for a given input
range of oil pressure, say 0 to 100 psi. Inputting the 12-bit A/D
into a 16-bit CPU is straightforward. The least significant bit of
the A/D would be placed in the least significant bit on the CPU data
bus, like this:
|
CPU Bit
|
15
|
14
|
13
|
12
|
11
|
10
|
9
|
8
|
7
|
6
|
5
|
4
|
3
|
2
|
1
|
0
|
|
A/D Bit
|
x
|
x
|
x
|
x
|
11
|
10
|
9
|
8
|
7
|
6
|
5
|
4
|
3
|
2
|
1
|
0
|
Bits 12ý15 would be read in as all zeros.
So, 0-psi pressure would be 0 counts, and 100-psi pressure would be
4095 counts. Any manipulation of the data, such as filtering, would
be a pure mathematical process on the binary readings.
PREVIOUS
NEXT
Circuit Cellar provides up-to-date information for engineers. Visit
www.circuitcellar.com for
more information and additional articles.
For subscription information, call (860) 875-2199, subscribe@circuitcellar.com
or subscribe online.
ýCircuit Cellar, the Magazine for Computer Applications. Posted with
permission. |