Clock to use with LCD NK5110. You need to use N5110 libraries
Fork of Nokia5110 by
Diff: main.cpp
- Revision:
- 2:e448efb1fa68
- Parent:
- 1:e25ab356dc9b
- Child:
- 4:9382162fdb60
--- a/main.cpp Mon Jan 16 19:51:19 2012 +0000 +++ b/main.cpp Fri Jan 10 19:57:40 2014 +0000 @@ -1,40 +1,40 @@ -// Project: Nokia5110 - Controlling a NK5110 display from an NXP LPC1768 -// File: main.cpp -// Author: Chris Yan -// Created: January, 2012 -// Revised: -// Desc: A basic LCD output test which uses the NXP LPC1768's SPI interface to -// display pixels, characters, and numbers on the Nokia 5110 LCD. -// Created using a sparkfun breakout board with integrated Phillips 8544 driver -// for 48x84 LCDs. - -#include "mbed.h" -#include "NOKIA_5110.h" - -int main() -{ - // Init the data structures and NokiaLcd class - LcdPins myPins; - myPins.sce = p8; - myPins.rst = p9; - myPins.dc = p10; - myPins.mosi = p11; - myPins.miso = NC; - myPins.sclk = p13; - - NokiaLcd myLcd( myPins ); - - // Start the LCD - myLcd.InitLcd(); - - // Draw a test pattern on the LCD and stall for 15 seconds - myLcd.TestLcd( 0xAA ); - wait( 15 ); - - // Turn off the LCD and enter an endless loop - myLcd.ShutdownLcd(); - while( 1 ) - { - //dance - } +// Project: Nokia5110 - Controlling a NK5110 display from an NXP LPC1768 +// File: main.cpp +// Author: Chris Yan +// Created: January, 2012 +// Revised: +// Desc: A basic LCD output test which uses the NXP LPC1768's SPI interface to +// display pixels, characters, and numbers on the Nokia 5110 LCD. +// Created using a sparkfun breakout board with integrated Phillips 8544 driver +// for 48x84 LCDs. + +#include "mbed.h" +#include "NOKIA_5110.h" + +int main() +{ + // Init the data structures and NokiaLcd class + LcdPins myPins; + myPins.sce = p8; + myPins.rst = p9; + myPins.dc = p10; + myPins.mosi = p11; + myPins.miso = NC; + myPins.sclk = p13; + + NokiaLcd myLcd( myPins ); + + // Start the LCD + myLcd.InitLcd(); + + // Draw a test pattern on the LCD and stall for 15 seconds + myLcd.TestLcd( 0xAA ); + wait( 15 ); + + // Turn off the LCD and enter an endless loop + myLcd.ShutdownLcd(); + while( 1 ) + { + //dance + } } \ No newline at end of file