Simple LCD clock
Bullwinkle
Posts: 101
This mini project utilises the Stampworks Development kit, containing the HD44780 (2x16) LCD display and the DS1307 RTC.
It is heavily based on experiments #11 and #33 from the StampWorks manual.
I have not provided a wiring diagram or schematic, since I didn't use any components not already available on the Stampworks kit.
Wiring is described as:
P0 <- 0 \
P1 <- 1 --- Momentary contact switches
P2 <- 2 /
P4 <-> SDA \ __ DS1307 RTC
P5 <-> SCL /
P8 <-> E \
P9 <-> RW \
P10 <-> RS \
P11 <-> DB4 --- HD44780 ( 2x16 ) LCD DISPLAY
P12 <-> DB5 /
P13 <-> DB6 /
P14 <-> DB7 /
This simple project is just a clock that utilises the RTC and LCD on the Stampworks kit and a few buttons, to be a more-or-less functional clock.
Operation:
The momentary contact 0 button is the mode button. This cycles between changing the minutes to the hours to the day to the date to the month to year. The currently selected value will blink appoximately 10 times per second, indicating it is the currently selected field. The momentary contact 1 and 2 buttons operate on the value currently selected by the mode button to increase or decrease the value within the valid range. The time continues to be displayed, and updated in the background. Changing the minutes value will reset the seconds value to zero, allowing a more precise reset operation.
This mini-project was intended just as a fun exercise to bring together the first few things I have learned about the Basic Stamp. I hope someone else can find the code useful.
Steve
It is heavily based on experiments #11 and #33 from the StampWorks manual.
I have not provided a wiring diagram or schematic, since I didn't use any components not already available on the Stampworks kit.
Wiring is described as:
P0 <- 0 \
P1 <- 1 --- Momentary contact switches
P2 <- 2 /
P4 <-> SDA \ __ DS1307 RTC
P5 <-> SCL /
P8 <-> E \
P9 <-> RW \
P10 <-> RS \
P11 <-> DB4 --- HD44780 ( 2x16 ) LCD DISPLAY
P12 <-> DB5 /
P13 <-> DB6 /
P14 <-> DB7 /
This simple project is just a clock that utilises the RTC and LCD on the Stampworks kit and a few buttons, to be a more-or-less functional clock.
Operation:
The momentary contact 0 button is the mode button. This cycles between changing the minutes to the hours to the day to the date to the month to year. The currently selected value will blink appoximately 10 times per second, indicating it is the currently selected field. The momentary contact 1 and 2 buttons operate on the value currently selected by the mode button to increase or decrease the value within the valid range. The time continues to be displayed, and updated in the background. Changing the minutes value will reset the seconds value to zero, allowing a more precise reset operation.
This mini-project was intended just as a fun exercise to bring together the first few things I have learned about the Basic Stamp. I hope someone else can find the code useful.
Steve
Comments
I appreciate that you shared.
The last 4 pins of the LCD should be wired so:
P12 <-> DB4 --- HD44780 ( 2x16 ) LCD DISPLAY
P13 <-> DB5 /
P14 <-> DB6 /
P15 <-> DB7 /
Sorry about that.