Electronic Time Clock
Electronic Time ClockThis application note from Microchip Technology uses an 18 pin PIC16C54 microcontroller as its core in the display and settings of a simple 4 digits electronic clock. The four 7 segment displays are connected in a multiplexing methodand each segment is sequentially by controlling the Common Cathode of each 7 segment. The common cathodes are connectedto 4 pins of PORTA of the microcontroller. When the pin in PORTA is LOW, the transistor connected to it will turn ON andthat particular 7 segment is turn ON. PortB will activate the segments of that particular 7 segment that has been chosen.By multiplexing the selection of the 7 segment sequentially, an equal brightness of all the 7 segments display will be achieved. Multiplexing has the advantage in that it helps to reduce the number of ports needed to connect to the 7 segments. It alsokeep the cost of a device low as fewer parts are needed. The setback is that the display may not be as bright as if it isdriven directly without multiplexing.

The 3 switches are also connected to PORTB. They are pulled down to logic "0" by using a 10k ohm resistors. Inputs of theswitches are detected as logic "1" by the MCU by connecting a pull up resistor to the VDD. Pressing SW1 changes the secondssetting, SW2 the minutes setting and SW3 the hour setting. The full schematic and source code listing can be obtainedfrom
Microchip website.
Electronic Time Clock Home Page
New! Comments
Have your say about what you just read! Leave us a comment in the box below.
|