Programming and application of the AT89C2051 microcontroller.
Application of BCD to seven segment decoder/driver IC CD4511.
Application and interfacing of seven segment displays, relays.
The AT89C2051 based Countdown Timer can perform countdown operation for upto 99 minutes with two 7-segment displays showing the time left. During the activity period, a relay is latched and a flashing LED indicates countdown timing progress.
No. of ICs used: 3
The circuit of the Microcontroller based Countdown Timer uses four tactile, push-to-on switches to start/stop and to set the initial value for countdown operation. The timing value can also be changed while the counting is still in progress. Auto-repeat key logic also works, i.e., if you hold ‘Up’ or ‘Down’ key continuously, the timing as shown on 7-segment LED displays changes at a faster rate.
The AT89C2051 microcontroller is a 20-pin DIP and forms the heart of the circuit. Port 1 of IC1 is used to drive two 7-segment displays through ICs CD4511 (IC2 and IC3), which are BCD-to-7-segment converters. A 6MHz crystal is used for timing. Timer 0 is used as an internal counter and increments a variable every second. This variable is used in the project for providing accurate timing. The software waits for ‘Start’ switch to be pressed to start timing operation. It can be stopped anytime by pressing ‘Stop’ switch momentarily. ‘Up’ and ‘Down’ set switches are used for setting the time (in minutes), as displayed on 7-segment display. This function is directly handled by interrupts 0 and 1 in the software. The Start, Stop, Up and Down switches are connected to port 3. Port 3 does not have the bit p3.6 and it is ignored.
A flashing LED connected to port 3.4 shows that the timing activity is in progress.
Relay energisation pin 11 is connected to a driver transistor to switch on a 5V relay that can activate any electrical device. (A different external voltage (9 to 12V) can also be used to power the relay and driver transistor T2, after disconnecting the 5V supply at the junction of relay RL1 and the cathode of D1.) The BCD code for unit’s is output at pins P1.0 through P1.3 and for ten’s at pins P1.4 through P1.7. All these eight pins are pulled high through 10-kilo-ohm resistors of RNW1. These pins are coupled to ‘A’ through ‘D’ input pins of BCD-to-7-sement decoder driver IC3 (for unit’s) and IC2 (for ten’s). The segment-driving outputs of IC3 and IC2 are coupled to 7-segment, common-cathode displays DIS2 (unit’s) and DIS1 (ten’s), respectively.
Brand: Kits'n'spares, Marketed by: Kits'n'spares