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] [--list]

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
  --list                    list supported chips

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

Without action arguments (only -p), stc8isp shows the chip, its frequency, flash size and option bytes.

Metadata

Release files for stc8isp 1.1.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.1.0
File Size Uploaded Provenance Actions
stc8isp-1.1.0.tar.gz 11.0 kB Without provenance Details for stc8isp-1.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 20.9 kB

Release files / stc8isp-1.1.0.tar.gz

Download URL stc8isp-1.1.0.tar.gz
Size 11.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5a44bbbcd614b93055458aa1ddae651226b516e5bda874c26d833d7a217948b9
BLAKE2b-256 checksum
How to use checksums
ede950cc1addfacc064cb9dab92a854560219212698abbf025c5eb747e957ce0
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.1.0-py3-none-any.whl

Download URL stc8isp-1.1.0-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f3ccbad3d1281a8c7321c58663af4bb7ec07d99ef22cdd827118e8b648fc837a
BLAKE2b-256 checksum
How to use checksums
1e056559cdfc483b74af8dabb811b1749a32fdd8c8bfcfd6f3dbf35a80026c24
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.1.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