Skip to main content

Programming Tool for STC8G/8H Microcontrollers

Description

With this tool, STC8G/8H microcontrollers can be flashed via a simple USB-to-serial converter by utilizing the factory built-in embedded UART bootloader.

The tool currently supports the following microcontrollers (bootloader v7.2 and later):

  • STC8G1K, STC8G2K
  • STC8H1K (incl. T versions), STC8H2K/4K TL/TLCD, STC8H3K, STC8H4K TLR/LCD, STC8H8K
  • STC8A8K/STC8A2K D4

When trimming the IRC (-t), the other option bytes (MCS registers) of the MCU are retained.

Preparations

If necessary, a driver for the USB-to-serial converter used must be installed.

Installation

Ensure that the prerequisites for installing Python packages are met. Then execute the following command in the command line:

pip install stc8isp

Usage

  • Connect your USB-to-serial converter to your MCU as shown below.
  • Run stc8isp.py (see below for arguments).
  • Perform a power cycle of your MCU (reconnect to power) when prompted.
USB2SERIAL         STC8G/8H
+--------+         +------+
|     VCC| --/ --> |VCC   |    interruptible (for power cycle)
|     RXD| --|R|-- |P3.1  |    resistor (100R - 1000R)
|     TXD| --|<|-- |P3.0  |    diode (e.g. 1N5819)
|     GND| ------- |GND   |    common ground
+--------+         +------+
Usage: stc8isp [-h] [-p PORT] [-t TRIM] [-e] [-f FLASH]

Optional arguments:
  -h,       --help          show this help message and exit
  -p PORT,  --port PORT     set COM port (default: /dev/ttyUSB0)
  -t TRIM,  --trim TRIM     trim IRC to frequency in Hz (128000 - 36000000)
  -e,       --erase         perform chip erase (implied with -f)
  -f FLASH, --flash FLASH   write BIN file to flash

Example:
stc8isp -p /dev/ttyUSB0 -t 24000000 -f firmware.bin

Metadata

Release files for stc8isp 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stc8isp 1.0.0
File Size Uploaded Provenance Actions
stc8isp-1.0.0.tar.gz 12.2 kB Without provenance Details for stc8isp-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for stc8isp 1.0.0
File Interpreter ABI Platform Actions
stc8isp-1.0.0-py3-none-any.whl Python 3 none any Details for stc8isp-1.0.0-py3-none-any.whl

Total release size: 23.2 kB

Release files / stc8isp-1.0.0.tar.gz

Download URL stc8isp-1.0.0.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0b1c32bb12c345644469355d3d70605d3faddcaab06f5b6235a27dfd600702b1
BLAKE2b-256 checksum
How to use checksums
1915ace5c3c49f401fb9047463118dfeb03d81c91148c178f8f8034068ab9656
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / stc8isp-1.0.0-py3-none-any.whl

Download URL stc8isp-1.0.0-py3-none-any.whl
Size 11.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d7568e5760ab44df5fd0179f05105766d1cc0cb008f0324139836ad68a7bc123
BLAKE2b-256 checksum
How to use checksums
89dc9d89bdaabbf48ec7b5a70eb45cca39e60525ac3874f2351010fbb2f7780f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for stc8isp 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page