AN2264 Motorola Semiconductor Products, AN2264 Datasheet - Page 6

no-image

AN2264

Manufacturer Part Number
AN2264
Description
Freescale Semiconductor, Inc.
Manufacturer
Motorola Semiconductor Products
Datasheet
Freescale Semiconductor, Inc.
AN2264/D
negative (<60) so if this is the case the subtraction is done the other way round
(60 – bits) to give a sensible (but positive) value. The fact that it was actually
negative is recorded by setting the negative flag.
The value in bits is then converted as shown in figure 3 into the required
7-segment format using the array seg. Firstly the digit after the decimal point is
configured as a 0 or a 5 according to the least significant bit in bits. Bits is then
divided by two to yield the binary temperature in °C. This is divided again by ten
to give the tens digit while the units digit is the remainder from this division. The
units, tens and sign (hundreds) digits are then configured with the appropriate
segments, the only complications being the addition of the decimal point to the
units digit and the various possibilities for the tens digit. If the tens digit
constitutes a leading zero then it should be blank unless the temperature is
negative. In this case the display is neater if the negative sign is displayed in
the tens position rather than in the hundreds position.
To output information to the LED display, dcount is incremented and the digit
to be driven this time around the loop is selected by using the two least
significant bits of the variable dcount. They are used as an index in the array
display for the segment data going to portD and also in scan for the digit drive
to portF.
6
LIN Node Temperature Display
MOTOROLA
For More Information On This Product,
Go to: www.freescale.com

Related parts for AN2264