'Almost No Parts' 12/24hrs LED Clock
A 12hr/24hr LED Clock with display control, uses a microcontroller PIC 16F84A or 16F628A and a few parts. (August 25, 2009)
This LED clock may not be the easiest to build but surely it is the one with fewer parts that you can find, for that reason I call it "The ANP LED Clock". (ANP stands for Almost No Parts.)
Using the micro controller PIC 16F84A or the 16F628 (same pinout), this clock have more and improved features than my previous LED Clock.
Here are the features on this ANP LED Clock:
Because all this features, the applications for this ANP LED Clock could be:
Let's get technical, here is the pin out information for this project:
Pin 1 to VDD for 12Hrs, VSS for 24Hrs
Pin 2 to VDD C Anode display, VSS for C Cathode
Pin 3 to VDD Enable display, VSS disable display
Pin 4 to VDD Normal operation, VSS Reset
Pin 5 VSS Ground or -
Pins 6..13 To multiplexed display
Pin 14 VDD or +
Pins 15 & 16 Xtal Oscillator (4Mhz only)
Pin 17 to Display Decimal Point
Pin 18 PM LED indicator (optional)
Here are some examples how configuration pins are wired:
Figure A: For 12 Hours LED clock using Common Anode 7-segment LED displays.
Figure B: For 24 Hours LED Clock using Common Cathode 7-segment LED displays.
Figure C: For 24 Hours LED clock using Common Anode 7-segment LED displays.
Figure D: For Battery operated clocks, a 10k resistor and a switch can be used to view the time, specially for wrist watches.
Please note the PM LED indicator and the Brightness control switch are optional.
Bill of materials:
1 PIC 16F84A with JP8410-a software
1 Xtal 4 Mhz
2 22pF ceramic capacitors
2 n.o. micro switches.
4 7-segment LED displays (CA or CC)
1 LED for PM indicator
1 4.7k resistor
1 n.o. microswitch for brightness control.
1.- Before applying power to the circuit, set the configuration pins to the one desired. DO NOT APPLY POWER without connecting pins 1, 2 & 3.
2.- Device configuration: CP Off, WDT Off, PWRTMR ON, OSC Xtal.
How it Works:
The displays are "Charlieplexed" and controlled with modulated pulses, also know as PWM (Pulse width modulation). There are no resistors on most of my projects because I limit the current using the software instead of using resistors. Also, I do use the internal pull-ups from the microcontroller PIC itself. The 1-second routine is similar to the one used by Roman Black but not the same. To keep accuracy, connections to the XTAL and 22pf capacitors must be as short is possible. Read the specifications from the Xtal manufacturer.
NOTE: The display shows some glitches because the frequency of the video doesn't match with the frequency of the display. It works very well the project itself.
As the switches are multiplexed with the display, the display goes black as long any button is pressed. The Brightness switch decreases the brightness of the display, there are six levels of brightness. I do recommend to use RED displays because RED LEDs have a lower forward voltage than any other color, so the brightness of the display will be higher.
or, you can download the FREE 16F628A HEX FILE (demo version). Right click and "Save link as...".
Do you want to buy the source code (ASM) and non-demo HEX file for both 16F628A and 16F84A?
The non-demo version doesn't display the "josepino dot com" message.
Non-demo Version: $3.99 USD
|< Air Display.||Homepage
|Anthony Sotillet's POV Display>|