Index

About Tongsheng TSDZ2 mid drive motors

  1. Motor controller
    1. log
  2. LCD - VLCD5
  3. Motor
  4. Torque sensor and PAS

Datasheets and application notes

  1. STM8S105S4T6

Development tools

Various

  1. 2018.04.18 - original firmware and debug session using OpenOCD
  2. 2018.04.19 - First code runs: Hello world
  3. Math operations CPU time

LCD - VLCD5

VLCD5



Err-02 is Motor Hall Fault or Short Circuit
Err-03 is Controller Failure
Err-04 is throttle fault
Err-06 is torque sensor calibration error during power-on
Err-08 is Low Battery

images/4-1.png

The metallic pins and springs to connect by contact, the wires from the cable of motor controller to the PCB (see table bellow):
images/4-2.png

Cable from motor controller | PAD on LCD PCB | notes
• green | P+ | battery voltage!!
• black | GND | ground
• white | Vin | ground when LCD disabled and P+ (battery voltage) when LCD is enabled
• brown | RX | UART TX motor controller
• orange | TX | UART RX motor controller
• purple | not connected | this cable is not connected to any PAD
• not available | 5V | the PAD has 5V label but seems it is not connected

NOTE: the motor controller can be enabled by simple connect green wire to white wire and this way there is no need to use LCD.

Microcontroller:
• HR7P194FGL from Haier (Chinese brand)

• Datasheet in Chinese:
Linked file: HAIER_HR7P194FGL_datasheet_chinese.pdf


• Specifications:
Vcc(V): 3~5.5
Program Memory(ROM): FLASH:8K x 15bit
Data Memory(RAM)(Byte): SRAM:496 x 8bit
ADCs: 10 x 10bit
Interrupt: 17
IOSC: 16MHz,the lowest frequency division to 125K
Operating Frequency(MHz): 16
I/O: 41
Timer: 4 x 8bit,1 x 16bit
Communication Interface: UART(1);I2C(1)
BOR/ICD/ISP/ICE/WDT: Y/Y/Y/-/Y
Package/Temperature(℃): LQFP-44/-40~85
Description: Inline LCD driver,FLASH,high-current IO,high-performance Harvard-type RISC architecture,8Bit MCU