![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Opis nova verzija
Dependencies: N5110SPI SWSPI mbed
Fork of Nokia_FRDM by
main.cpp@0:01c7393abf13, 2014-04-08 (annotated)
- Committer:
- esokic
- Date:
- Tue Apr 08 12:17:12 2014 +0000
- Revision:
- 0:01c7393abf13
- Child:
- 1:a174ab8a7339
Nokia 5110 displej test
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
esokic | 0:01c7393abf13 | 1 | #include "mbed.h" |
esokic | 0:01c7393abf13 | 2 | #include "N5110.h" |
esokic | 0:01c7393abf13 | 3 | |
esokic | 0:01c7393abf13 | 4 | //Deklaracija LCD objekta |
esokic | 0:01c7393abf13 | 5 | //N5110 lcd(VCC,SCE,RST,D/C,MOSI,SCLK,LED) |
esokic | 0:01c7393abf13 | 6 | N5110 lcd(dp4,dp24,dp23,dp25,dp2,dp6,dp18); |
esokic | 0:01c7393abf13 | 7 | |
esokic | 0:01c7393abf13 | 8 | //Digitalni izlaz za deaktivaciju LED buffera |
esokic | 0:01c7393abf13 | 9 | DigitalOut enable(dp14); |
esokic | 0:01c7393abf13 | 10 | |
esokic | 0:01c7393abf13 | 11 | int main() |
esokic | 0:01c7393abf13 | 12 | { |
esokic | 0:01c7393abf13 | 13 | enable=1; |
esokic | 0:01c7393abf13 | 14 | |
esokic | 0:01c7393abf13 | 15 | // inicijalizacija displeja |
esokic | 0:01c7393abf13 | 16 | lcd.init(); |
esokic | 0:01c7393abf13 | 17 | |
esokic | 0:01c7393abf13 | 18 | // prikaz stringa |
esokic | 0:01c7393abf13 | 19 | lcd.printString("Mi volimo PAI!",0,0); |
esokic | 0:01c7393abf13 | 20 | |
esokic | 0:01c7393abf13 | 21 | while(1); |
esokic | 0:01c7393abf13 | 22 | } |