Edutech IoT Team
/
Eg6_LCD_CharacterDisplay
Displays HELLO using Character Display function
main.cpp@1:033c7aaa6898, 2015-10-10 (annotated)
- Committer:
- dwijaybane
- Date:
- Sat Oct 10 06:16:24 2015 +0000
- Revision:
- 1:033c7aaa6898
- Parent:
- 0:c023272f2367
comments updated
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dwijaybane | 1:033c7aaa6898 | 1 | #include "mbed.h" // Basic Library required for onchip peripherals |
dwijaybane | 1:033c7aaa6898 | 2 | #include "C12832.h" // Library for SPI based LCD |
dwijaybane | 0:c023272f2367 | 3 | |
dwijaybane | 1:033c7aaa6898 | 4 | /* Create Objects */ |
dwijaybane | 1:033c7aaa6898 | 5 | C12832 lcd(p5, p7, p6, p8, p11); // Initialize lcd object with SPI pins |
dwijaybane | 0:c023272f2367 | 6 | |
dwijaybane | 1:033c7aaa6898 | 7 | /* Main Program */ |
dwijaybane | 0:c023272f2367 | 8 | int main() |
dwijaybane | 0:c023272f2367 | 9 | { |
dwijaybane | 1:033c7aaa6898 | 10 | lcd.cls(); // Clear LCD Screen |
dwijaybane | 0:c023272f2367 | 11 | |
dwijaybane | 1:033c7aaa6898 | 12 | lcd._putc('H'); // Display single character |
dwijaybane | 0:c023272f2367 | 13 | lcd._putc('E'); |
dwijaybane | 0:c023272f2367 | 14 | lcd._putc('L'); |
dwijaybane | 0:c023272f2367 | 15 | lcd._putc('L'); |
dwijaybane | 0:c023272f2367 | 16 | lcd._putc('O'); |
dwijaybane | 0:c023272f2367 | 17 | |
dwijaybane | 0:c023272f2367 | 18 | while(1); |
dwijaybane | 0:c023272f2367 | 19 | } |