5316

Reverse Project - Mini Oscilloscope. Reprogram it using SDCC


To download assembly instructions &  user manual (everything in Chinese) use the password "DFRE" as shown below

webpage-translated.png

 

Original Project by Creative Lau

Project origin: https://github.com/CreativeLau/Mini-DSO
Video: https://www.youtube.com/watch?v=-8PadlS7c4c

New Software

The project from Creative Lau ported to SDCC can be downloaded below. The HEX file is included.

Bug in SDCC

SDCC does not produce proper code for reading a string from a table in program memory. The Mini-DSO uses two of these tables, and reading them the SDCC way makes the program crash. Replacing the tables by functions fixed the issue.

In-Circuit Programming of the STC MCU

Download the STC-ISP tool from the STCmicro website.

Get device information
  1. Switched off the device,
  2. Click the Check MCU button
  3. Switch the device on

Information about the MCU appears in the output window.

An interesting observation here was that it showed the MCU as an STC8A8K64D4 instead of an S4A12. I used STC-ISP version◦V6.91K. V6.94K doesn’t seem to have the Check MCU button.

Upload a HEX file

  1. Switch off the board
  2. Load the HEX file in the STC-ISP tool and
  3. Click the Download/Program button
  4. Switch on the board to start programming

It takes about ten seconds to complete.

Full Article

The complete article can be downloaded here.