Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 1:133b9b91ca6b, committed 2014-02-19
- Comitter:
- jppang
- Date:
- Wed Feb 19 04:18:43 2014 +0000
- Parent:
- 0:34125ddb025e
- Child:
- 2:046bfae72c0c
- Commit message:
- modified some commands
Changed in this revision
| NokiaLCD_SWSPI.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/NokiaLCD_SWSPI.cpp Tue Feb 18 04:19:55 2014 +0000
+++ b/NokiaLCD_SWSPI.cpp Wed Feb 19 04:18:43 2014 +0000
@@ -12,11 +12,15 @@
#include "mbed.h"
#include "SWSPI.h"
+//#define NOKIALCD_ROWS 16
+//#define NOKIALCD_COLS 16
+//#define NOKIALCD_WIDTH 130
+//#define NOKIALCD_HEIGHT 130
#define NOKIALCD_ROWS 16
#define NOKIALCD_COLS 16
-#define NOKIALCD_WIDTH 130
-#define NOKIALCD_HEIGHT 130
-#define NOKIALCD_FREQUENCY 5000000
+#define NOKIALCD_WIDTH 132
+#define NOKIALCD_HEIGHT 132
+#define NOKIALCD_FREQUENCY 6000000
NokiaLCD_SWSPI::NokiaLCD_SWSPI(PinName mosi, PinName miso, PinName sclk, PinName cs, PinName rst, LCDType type)
: _spi(mosi, miso, sclk)
@@ -95,10 +99,12 @@
case PCF8833:
command(0x11); // sleep out
+ command(0x13); // normal mode (not in original Nokia lib)
+ command(0x20); // INVON (not in original NokiaLCD lib)
command(0x3A); // column mode
- data(0x05);
+ data(0x05); //0x05 in original NokiaLCD lib
command(0x36); // madctl
- data(0x60); // vertical RAM, flip x
+ data(0xC8); // vertical RAM, flip x, 0x60 in original NokiaLCD lib
command(0x25); // setcon
data(0x30);// contrast 0x30
wait_ms(2);