Introduction to Microcontroller Programming
About PICmicro Chips
Clocking Your PICmicro Devices E-Blocks Flowcode Step By Step
PICmicro Projects
Labs |
7-Segment Decoder DriverYou can run a 7-segment display directly from the PICmicro chip. However, that would take up seven bits of the PICmicro output port, one for each LED in the display. In some applications, that may not leave sufficient bits to operate other devices. An alternative is to use a decoder/driver chip to do some of the work. This would use only four output bits. This chip accepts a binary input, (well, binary-coded decimal to be more precise,) and converts it into the seven signals needed to control the display. The 'driver' part of its name shows that it draws little current from the PICmicro to do so. The CMOS 4511 chip is a 7-segment decoder/driver, used with common-cathode displays. The pin out for this chip is given in the diagram. The inputs D, C, B and A, accept the binary number. This must be supplied the right-way round! Input D expects the most significant bit of the number, and input A the least significant bit. The following table illustrates the point. Decimal 4511 inputs
The 4511 has three control inputs that allow you to:
All of these functions can be integrated into the PICmicro program itself, in which case you disable them on the 4511, by connecting 'LT' and 'BI' to the positive supply rail, and 'ST' to 0V. The next diagram shows a 4511 connected to a 7-segment display, with the control functions disabled. Notice the protective 330ohm resistor! |