From 9dbcfe160e89f0de81e0a788ff8ce7fb162655db Mon Sep 17 00:00:00 2001 From: prenticedavid Date: Wed, 27 Mar 2019 16:46:07 +0000 Subject: [PATCH] Wiki 21: BluePill Adapter wiring. Touchscreen wiring --- extras/mcufriend_how_to.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/extras/mcufriend_how_to.txt b/extras/mcufriend_how_to.txt index 0d0361f..9cf403e 100644 --- a/extras/mcufriend_how_to.txt +++ b/extras/mcufriend_how_to.txt @@ -134,4 +134,21 @@ It also runs on NUCLEO-F103 and TEENSY3.2 with Sparkfun Adapter Mega: Old boards do not have SDA/SCL on AREF header. Only external I2C devices on COMMS header Due: MAX809 Reset chip interferes with 3.3V RST on SPI header. Manual reset for Upload / Run. +21. BLUEPILL Adapter standard wiring is: + //LCD pins |D7 |D6 |D5 |D4 |D3 |D2 |D1 |D0 | |RD |WR |RS |CS |RST| |SD_SS|SD_DI|SD_DO|SD_SCK| + //STM32 pin |PA7|PA6|PA5|PA4|PA3|PA2|PA1|PA0| |PB0|PB6|PB7|PB8|PB9| |PB12 |PB15 |PB14 |PB13 | **SPI2** + + Maple core: to use SPI2 for SPI. edit SPI.cpp for SPIClass SPI(2); + STM Core: to use SPI2 for SPI. edit variant.h to use PB12-PB15 for SPI_SS etc + + Touchscreen needs XM, YP to be on Analog capable pins. Measure resistance with DMM to determine X, Y + 300R pair is XP, XM. 500R pair is YP, YM. choose XM, YP from PA7, PA6. XP, YM from PB6, PB7 + Run the Calibration sketch to get accurate TS_LEFT, TS_RT, TS_TOP, TS_BOT values. + Ignore the XP, XM, ... values. They mean nothing on a BluePill + + Adafruit_Touchscreen might need: typedef volatile uint32_t RwReg; + + Maple core: use Touchscreen_kbv library + STM Core: regular Touchscreen libraries should be ok. + CHANGE HISTORY: is now in "mcufriend_history.txt"