The example will show on the LCD the seconds that has passed since Arduino was restarted.
I hope it will be useful to you.
What do you need for THIS example?
- Arduino IDE installed
- One IC 74HC595
- One 4.7Kohm resistor or similar
- One "104" capacitor
Step 1: Place the Library Under Arduino Folder
This one is the library that I've programmed. Comments are welcome.
Step 2: LCD Library
It's based on www.slashdev.ca/arduino-lcd-library/ and has the necessary changes to integrate the ShiftOut Library that I made.
This must be uncompressed under %arduino-directory%/hardware/libraries too.
Step 3: Open Arduino IDE
ShiftOut sOut(8, 12, 11, 1);
Lcd lcd = Lcd(16, FUNCTION_4BIT | FUNCTION_2LINE | FUNCTION_5x11, &sOut);
lcd.set_ctrl_pins(CTRLPINS(1,2,3)); // RS->1, RW->2, E->3
lcd.set_data_pins(_4PINS(4,5,6,7)); // D4->4, D5->5, D6->6, D7->7
lcd.print((long)millis() / 1000);
This simple sketch shows on the LCD the seconds that has passed since Arduino was restarted.
Step 4: Compilation
If everything was OK, you could connect Arduino to a 74HC595 and this one to a LCD following the schematic images diagrammed using Fritzing.
The connection should be as follow:
Step 5: Run the Sketch on Arduino
Step 6: Conclusion
Step 7: Bonus Track: Another Example
More info could be found here: http://gusps.blogspot.com/