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.
Dependencies: mbed mbed-STM32F103C8T6
main.cpp@2:7e4457bc20b0, 2019-01-16 (annotated)
- Committer:
- moyoumos
- Date:
- Wed Jan 16 09:10:14 2019 +0000
- Revision:
- 2:7e4457bc20b0
- Parent:
- 1:621d776b1313
test for the Nokia 1202 LCD (STM32F103C8T6)
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| hudakz | 0:1be8870a132e | 1 | /* |
| hudakz | 0:1be8870a132e | 2 | * Nokia 5110 LCD demo |
| hudakz | 0:1be8870a132e | 3 | */ |
| hudakz | 0:1be8870a132e | 4 | #include "stm32f103c8t6.h" |
| hudakz | 0:1be8870a132e | 5 | #include "mbed.h" |
| moyoumos | 1:621d776b1313 | 6 | #include "nLCD.h" |
| hudakz | 0:1be8870a132e | 7 | |
| moyoumos | 1:621d776b1313 | 8 | graphicsLCD lcd(PB_3,PB_4,PB_5,PB_6); // RST, CS, MOSI, CLK |
| hudakz | 0:1be8870a132e | 9 | |
| hudakz | 0:1be8870a132e | 10 | int main() |
| hudakz | 0:1be8870a132e | 11 | { |
| hudakz | 0:1be8870a132e | 12 | confSysClock(); // configure system clock (72MHz HSE clock, 48MHz USB clock) |
| hudakz | 0:1be8870a132e | 13 | lcd.init(); // first need to initialise display |
| hudakz | 0:1be8870a132e | 14 | |
| hudakz | 0:1be8870a132e | 15 | while(1) { |
| hudakz | 0:1be8870a132e | 16 | // can directly print strings at specified co-ordinates |
| moyoumos | 1:621d776b1313 | 17 | lcd.print("Hello, World!"); |
| hudakz | 0:1be8870a132e | 18 | wait(5.0); |
| hudakz | 0:1be8870a132e | 19 | lcd.clear(); // clear display |
| moyoumos | 2:7e4457bc20b0 | 20 | wait(2.0); |
| hudakz | 0:1be8870a132e | 21 | } |
| hudakz | 0:1be8870a132e | 22 | } |