A fork of Chris Yan's Nokia 5110 LCD library, adapted to LPC1347. Should work on a DipCortex M3 and an EzSBC2 dev board.
Fork of Nokia5110 by
Revision 4:46e538ce39d4, committed 2015-07-02
- Comitter:
- smultron1977
- Date:
- Thu Jul 02 23:52:55 2015 +0000
- Parent:
- 3:41063eb2a040
- Commit message:
- A fork of Nokia 5110 lib by Chris Yan adapted for LPC1347 (and EzSBC2 dev board)
Changed in this revision
diff -r 41063eb2a040 -r 46e538ce39d4 NOKIA_5110.cpp --- a/NOKIA_5110.cpp Fri Jan 10 22:22:17 2014 +0000 +++ b/NOKIA_5110.cpp Thu Jul 02 23:52:55 2015 +0000 @@ -50,7 +50,7 @@ void NokiaLcd::TestLcd(char test_pattern) { - for(int tick = 0; tick <= 503; tick++) + for(int tick = 0; tick <= 504; tick++) LcdSpi->write(test_pattern); // Command gets sent }
diff -r 41063eb2a040 -r 46e538ce39d4 main.cpp --- a/main.cpp Fri Jan 10 22:22:17 2014 +0000 +++ b/main.cpp Thu Jul 02 23:52:55 2015 +0000 @@ -7,6 +7,8 @@ // display pixels, characters, and numbers on the Nokia 5110 LCD. // Created using a sparkfun breakout board with integrated Phillips 8544 driver // for 48x84 LCDs. +// +// Version for EzSBC2 (an LPC1347 dev board similar to DipCortex M3) by Jonne Valola #include "mbed.h" #include "NOKIA_5110.h" @@ -15,12 +17,18 @@ { // Init the data structures and NokiaLcd class LcdPins myPins; - myPins.sce = p8; + /*myPins.sce = p8; myPins.rst = p9; myPins.dc = p10; myPins.mosi = p11; myPins.miso = NC; - myPins.sclk = p13; + myPins.sclk = p13;*/ + myPins.sce = P0_2; // SPI0 SSEL + myPins.rst = P0_4; // can be anything + myPins.dc = P0_5; + myPins.mosi = P0_9; + myPins.miso = P0_8; + myPins.sclk = P1_29; NokiaLcd myLcd( myPins );
diff -r 41063eb2a040 -r 46e538ce39d4 mbed.bld --- a/mbed.bld Fri Jan 10 22:22:17 2014 +0000 +++ b/mbed.bld Thu Jul 02 23:52:55 2015 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/5364839841bd \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/7cff1c4259d7 \ No newline at end of file