NUCLEO-F070R-DS1820

Dependencies:   mbed

Fork of NUCLEO-F401RE-DS1820andThermistorNTC10K by Enrico Marinoni

Committer:
anywill
Date:
Fri Oct 21 09:09:11 2016 +0000
Revision:
6:7f43285de85b
Parent:
5:22fb02a92579
nucleo 5110;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
anywill 6:7f43285de85b 1 // Project: Nokia5110 - Controlling a NK5110 display from an NXP LPC1768
anywill 6:7f43285de85b 2 // File: main.cpp
anywill 6:7f43285de85b 3 // Author: Chris Yan
anywill 6:7f43285de85b 4 // Created: January, 2012
anywill 6:7f43285de85b 5 // Revised:
anywill 6:7f43285de85b 6 // Desc: A basic LCD output test which uses the NXP LPC1768's SPI interface to
anywill 6:7f43285de85b 7 // display pixels, characters, and numbers on the Nokia 5110 LCD.
anywill 6:7f43285de85b 8 // Created using a sparkfun breakout board with integrated Phillips 8544 driver
anywill 6:7f43285de85b 9 // for 48x84 LCDs.
Sissors 0:e069f9f26768 10
Sissors 0:e069f9f26768 11 #include "mbed.h"
anywill 6:7f43285de85b 12 #include "NOKIA_5110.h"
emcu 4:02a922030bc3 13
anywill 5:22fb02a92579 14 int main()
anywill 6:7f43285de85b 15 {
anywill 6:7f43285de85b 16 // Init the data structures and NokiaLcd class
anywill 6:7f43285de85b 17 LcdPins myPins;
anywill 6:7f43285de85b 18 myPins.sce = D8;
anywill 6:7f43285de85b 19 myPins.rst = D9;
anywill 6:7f43285de85b 20 myPins.dc = D10;
anywill 6:7f43285de85b 21 myPins.mosi = D11;
anywill 6:7f43285de85b 22 myPins.miso = NC;
anywill 6:7f43285de85b 23 myPins.sclk = D13;//
Sissors 0:e069f9f26768 24
anywill 6:7f43285de85b 25 NokiaLcd myLcd( myPins );
anywill 5:22fb02a92579 26
anywill 6:7f43285de85b 27 // Start the LCD
anywill 6:7f43285de85b 28 myLcd.InitLcd();
Sissors 0:e069f9f26768 29
anywill 6:7f43285de85b 30 // Draw a test pattern on the LCD and stall for 15 seconds
anywill 6:7f43285de85b 31 myLcd.TestLcd( 0xAA );
anywill 6:7f43285de85b 32 wait( 15 );
anywill 6:7f43285de85b 33
anywill 6:7f43285de85b 34 // Turn off the LCD and enter an endless loop
anywill 6:7f43285de85b 35 myLcd.ShutdownLcd();
anywill 6:7f43285de85b 36 while( 1 )
anywill 6:7f43285de85b 37 {
anywill 6:7f43285de85b 38 //dance
Sissors 0:e069f9f26768 39 }
anywill 6:7f43285de85b 40 }