Demo for STM32F103C8T6 with a Text LCD.
Text LCD driven by STM32F103C8T6 board
This is a fork of Wim Huiskamp's example program using his enhanced TextLCD library.
For more details see also Wim's wonderful notebook page TextLCD Enhanced.
Schematic
Wiring
STM32F103C8T6 | Text LCD | |||
---|---|---|---|---|
GND | <=> | GND | ||
+5V | <=> | VCC | ||
+5V | <R1> | VO | ||
PA_8 | <=> | RS | ||
GND | <=> | RW | ||
PA_9 | <=> | E | ||
PA_10 | <=> | D4 | ||
PA_11 | <=> | D5 | ||
PA_12 | <=> | D6 | ||
PA_15 | <=> | D7 |
Revision 1:e10c603cf0ae, committed 2019-02-05
- Comitter:
- hudakz
- Date:
- Tue Feb 05 14:00:02 2019 +0000
- Parent:
- 0:271d74b09d64
- Commit message:
- Updated.
Changed in this revision
diff -r 271d74b09d64 -r e10c603cf0ae main.cpp --- a/main.cpp Sun Jan 15 11:07:07 2017 +0000 +++ b/main.cpp Tue Feb 05 14:00:02 2019 +0000 @@ -1,22 +1,17 @@ /* Hello World! for the TextLCD Enhanced Library*/ -#include "stm32f103c8t6.h" #include "mbed.h" #include "TextLCD.h" +// Host PC Communication channels +Serial pc(PA_2, PA_3); // tx, rx + +// LCD instantiation +TextLCD lcd(PA_8, PA_9, PA_10, PA_11, PA_12, PA_15, TextLCD::LCD16x2); // 4-bit bus: RS, E, D4, D5, D6, D7 +Timer t; int main() -{ - confSysClock(); // configure system clock (72MHz HSE clock, 48MHz USB clock) - - // Host PC Communication channels - Serial pc(PA_2, PA_3); // tx, rx - - // LCD instantiation - TextLCD lcd(PA_8, PA_9, PA_10, PA_11, PA_12, PA_15, TextLCD::LCD16x2); // 4-bit bus: RS, E, D4, D5, D6, D7 - Timer t; - - +{ pc.printf("TextLCD Enhanced Test. Columns=%d, Rows=%d\n\r", lcd.columns(), lcd.rows()); for (int row = 0; row < lcd.rows(); row++) {
diff -r 271d74b09d64 -r e10c603cf0ae mbed-STM32F103C8T6.lib --- a/mbed-STM32F103C8T6.lib Sun Jan 15 11:07:07 2017 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -http://mbed.org/users/hudakz/code/mbed-STM32F103C8T6/#09d8c2eacb4d
diff -r 271d74b09d64 -r e10c603cf0ae mbed.bld --- a/mbed.bld Sun Jan 15 11:07:07 2017 +0000 +++ b/mbed.bld Tue Feb 05 14:00:02 2019 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/99b5ccf27215 \ No newline at end of file +https://os.mbed.com/users/mbed_official/code/mbed/builds/3a7713b1edbc \ No newline at end of file