WH1602B LCD library based on the HD44780 4-bit interface
Fork of TextLCD by
Revision 9:0a815952e22f, committed 2016-12-09
- Comitter:
- mptapton
- Date:
- Fri Dec 09 12:21:23 2016 +0000
- Parent:
- 8:308d188a2d3a
- Commit message:
- This code uses libraries created for 4-bit LCD's based on the HD44780. This ; program was designed for a similar product (Winstar's WH1602B 2x16 LC) working into an Mbed LPC1768. Pin allocation and wiring described in comments in main.cpp header
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 308d188a2d3a -r 0a815952e22f main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Dec 09 12:21:23 2016 +0000 @@ -0,0 +1,23 @@ +#include "mbed.h" +#include "TextLCD.h" + +/* This code uses libraries created for 4-bit LCD's based on the HD44780. This +program was designed for a similar product (Winstar's WH1602B 2x16 LC) working +into an Mbed LPC1768. +LCD pins: Pin 1(VSS) to Mbed Gnd, Pin 2(VDD) to Mbed VOUT, Pin 3(Vo- contrast) +to Mbed Gnd, Pin 5(R/W) to Mbed Gnd, Pin 15(A)to Mbed VOUT, Pin 16(B) to +MBed Gnd, Pins 4(RS),20(E) and the 4 data bits (DB4 [11] through to DB7 [14]) +go to the Mbed pins described below: */ + +TextLCD lcd(p10, p12, p15, p16, p29, p30); // rs, e, d4-d7 + + int main() { + lcd.printf("Hello World!\n"); + wait (1); + lcd.printf("Test Message\n"); + wait (1); + lcd.cls(); + lcd.printf("Test OK\n"); + } + +