Home Page . . . . . . . Email: . . . . . . . . neelandan-at-gmãil·çöm
This is a clock using a sixteen-by-two line LCD module driven
by a PIC16F84A.
The timekeeping is driven by the timer0 interrupting the PIC 4000
times per second.
The interrupt routine counts this down to obtain seconds, minutes
and hours.
Seconds, Minutes and Hours are stored in BCD format. The clock
counts in 24 hour format.
The code takes up about a quarter of the program space in the
16f84A. Thus there is
sufficient space for code for applications which require access
to real time information
and display of 32 characters of information.
The interface to the LCD module is in four-bit mode and the
R/W pin of the module is
tied permanently low. This allows the module to be driven by six
lines from the controller.
An LED is connected to the (open drain) port line RA4. This
blinks once per second, giving
visual indication that the program in the PIC is alive. This
helps in troubleshooting if
the display should remain blank for any reason.
This is a lashup on a breadboard and circuit board as the
crystal I could lay my hands on
(extracted from a defunct circuit board) had extremely short
leads which wouldn't reach
into the breadboard contacts.
Source code of the Clock.
Diagram? You need a diagram? The connections are documented in the program.
Home Page . . . . . . . Email: . . . . . . . . neelandan-at-gmãil·çöm