First Draft of LCD Display
Dependencies: mbed
Fork of PE_08-01to04_ModularLCD by
main.cpp@1:66c78a2b81aa, 2014-12-07 (annotated)
- Committer:
- Richard37
- Date:
- Sun Dec 07 22:55:13 2014 +0000
- Revision:
- 1:66c78a2b81aa
- Parent:
- 0:519ae7e3077e
Got our LCD Display working
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
robt | 0:519ae7e3077e | 1 | /*Program Example 8.1, 8.2, 8.3, 8.4: TextLCD example |
robt | 0:519ae7e3077e | 2 | */ |
robt | 0:519ae7e3077e | 3 | |
robt | 0:519ae7e3077e | 4 | |
robt | 0:519ae7e3077e | 5 | #include "LCD.h" |
robt | 0:519ae7e3077e | 6 | |
robt | 0:519ae7e3077e | 7 | int main() { |
Richard37 | 1:66c78a2b81aa | 8 | int n; |
Richard37 | 1:66c78a2b81aa | 9 | const char line2[] = "Richard"; |
Richard37 | 1:66c78a2b81aa | 10 | |
robt | 0:519ae7e3077e | 11 | LCD_init(); |
Richard37 | 1:66c78a2b81aa | 12 | |
robt | 0:519ae7e3077e | 13 | display_to_LCD(0x48); // H |
robt | 0:519ae7e3077e | 14 | display_to_LCD(0x45); // E |
robt | 0:519ae7e3077e | 15 | display_to_LCD(0x4C); // L |
robt | 0:519ae7e3077e | 16 | display_to_LCD(0x4C); // L |
robt | 0:519ae7e3077e | 17 | display_to_LCD(0x4F); // O |
Richard37 | 1:66c78a2b81aa | 18 | send_command_to_LCD(0xC0 ); |
Richard37 | 1:66c78a2b81aa | 19 | for (n=0 ; n<8 ; ++n) display_to_LCD(line2[n]); |
Richard37 | 1:66c78a2b81aa | 20 | /*for(char x=0x30;x<=0x39;x++){ |
robt | 0:519ae7e3077e | 21 | display_to_LCD(x); // display numbers 0-9 |
Richard37 | 1:66c78a2b81aa | 22 | |
Richard37 | 1:66c78a2b81aa | 23 | }*/ |
robt | 0:519ae7e3077e | 24 | } |
robt | 0:519ae7e3077e | 25 |