WH1602B LCD library based on the HD44780 4-bit interface
Fork of TextLCD by
main.cpp
- Committer:
- mptapton
- Date:
- 2016-12-09
- Revision:
- 9:0a815952e22f
File content as of revision 9:0a815952e22f:
#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"); }