Nokia 5110 test stm32 nucleo pins working with Chris Yang's NOKIA_5110 library

Dependencies:   NOKIA_5110 mbed

Fork of Nokia5110_KL25Z by Thiha Electronics

Committer:
c128
Date:
Sat Aug 16 05:53:26 2014 +0000
Revision:
1:8e117fc4a3ac
Parent:
0:083b72141582
Nokia LCD 5110 stm32 nucleo  pins working

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ThihaElectronics 0:083b72141582 1 #include "mbed.h"
ThihaElectronics 0:083b72141582 2 #include "NOKIA_5110.h"
ThihaElectronics 0:083b72141582 3
ThihaElectronics 0:083b72141582 4 int main() {
ThihaElectronics 0:083b72141582 5
c128 1:8e117fc4a3ac 6 LcdPins myPins;
c128 1:8e117fc4a3ac 7
c128 1:8e117fc4a3ac 8 // myPins.sce = PB_6;
c128 1:8e117fc4a3ac 9 myPins.sce = PA_9;
c128 1:8e117fc4a3ac 10 myPins.rst = PA_6;
c128 1:8e117fc4a3ac 11 myPins.dc = PA_8;
c128 1:8e117fc4a3ac 12 myPins.mosi = PA_7;//SPI_MOSI;
c128 1:8e117fc4a3ac 13 myPins.miso = NC;
c128 1:8e117fc4a3ac 14 myPins.sclk = PA_5;//SPI_SCK;
ThihaElectronics 0:083b72141582 15
c128 1:8e117fc4a3ac 16 // Start the LCD
c128 1:8e117fc4a3ac 17 NokiaLcd myLcd( myPins );
c128 1:8e117fc4a3ac 18
ThihaElectronics 0:083b72141582 19 myLcd.InitLcd(); // LCD is reset and DDRAM is cleared
ThihaElectronics 0:083b72141582 20 myLcd.DrawString("Hello");
ThihaElectronics 0:083b72141582 21 while(1)
ThihaElectronics 0:083b72141582 22 { };
ThihaElectronics 0:083b72141582 23 }