Display Some Pixels on LCD C12832

Dependencies:   C12832 mbed

Committer:
dwijaybane
Date:
Wed Oct 07 12:40:54 2015 +0000
Revision:
1:045707712c1f
Parent:
0:8b93035ef74d
updated comments

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dwijaybane 1:045707712c1f 1 #include "mbed.h" // Basic Library required for onchip peripherals
dwijaybane 1:045707712c1f 2 #include "C12832.h" // Library for SPI based LCD
dwijaybane 0:8b93035ef74d 3
dwijaybane 1:045707712c1f 4 /* Create Objects */
dwijaybane 1:045707712c1f 5 C12832 lcd(p5, p7, p6, p8, p11); // Initialize lcd object with SPI pins
dwijaybane 0:8b93035ef74d 6
dwijaybane 1:045707712c1f 7 /* Main Program */
dwijaybane 0:8b93035ef74d 8 int main()
dwijaybane 0:8b93035ef74d 9 {
dwijaybane 1:045707712c1f 10 lcd.cls(); // Clear LCD Screen
dwijaybane 0:8b93035ef74d 11
dwijaybane 0:8b93035ef74d 12 lcd.pixel(10,10,1); // first pixel
dwijaybane 0:8b93035ef74d 13 lcd.pixel(11,11,1); // 2nd diagonal pixel
dwijaybane 0:8b93035ef74d 14 lcd.pixel(12,12,1); // 3rd diagonal pixel
dwijaybane 0:8b93035ef74d 15 lcd.pixel(13,13,1); // 4th diagonal pixel
dwijaybane 0:8b93035ef74d 16 lcd.copy_to_lcd(); // This will print the pixels
dwijaybane 0:8b93035ef74d 17
dwijaybane 0:8b93035ef74d 18 while(1);
dwijaybane 0:8b93035ef74d 19 }