Skip to main content

USB Programming Tool for STC8H8KxxU Microcontrollers

Description

This tool allows you to flash STC8H8KxxU microcontrollers through their USB interface, using the pre-installed embedded USB bootloader.

Supported microcontrollers: STC8H8K16U, STC8H8K32U, STC8H8K48U, STC8H8K60U, STC8H8K64U.

Preparations

Because the USB bootloader functions as a Human Interface Device (HID), there's no need to install drivers. However, Linux doesn't initially grant sufficient permissions to access the bootloader. To resolve this issue, open a terminal and execute the following commands:

echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="34bf", ATTR{idProduct}=="1001", MODE="666"' | sudo tee /etc/udev/rules.d/99-STC-ISP.rules
sudo udevadm control --reload-rules

Installation

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

pip install stc8usb

Usage

To initiate new uploads, the bootloader needs to be manually started. Begin by unplugging the board from the USB port and disconnecting all power sources. Then, press and hold the BOOT button while reconnecting the board to your PC's USB port. This action triggers the chip to enter bootloader mode. Once in this mode, you can release the BOOT button and proceed to upload new firmware via USB.

If your board doesn't have a BOOT button, you'll need to short pin P3.2 to ground while connecting to achieve the same effect.

Usage: stc8usb [-h] [-t TRIM] [-e] [-f FLASH]

Optional arguments:
  -h,       --help          show this help message and exit
  -t TRIM,  --trim TRIM     set MCU system frequency
  -e,       --erase         perform chip erase (implied with -f)
  -f FLASH, --flash FLASH   write BIN file to flash

Example:
stc8usb -t 24000000 -f firmware.bin

Possible values for -t (Hz): 250000, 500000, 1000000, 1382400, 2000000, 2764800, 3000000, 4000000, 5000000, 5529600, 6000000, 8000000, 10000000, 11059200, 12000000, 16000000, 18432000, 20000000, 22118400, 24000000, 27000000, 30000000, 33177600, 35000000, 36864000, 40000000, 44236800, 48000000. The other option bytes of the MCU are retained.

Metadata

Release files for stc8usb 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 stc8usb 1.0.0
File Size Uploaded Provenance Actions
stc8usb-1.0.0.tar.gz 8.4 kB Without provenance Details for stc8usb-1.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 16.8 kB

Release files / stc8usb-1.0.0.tar.gz

Download URL stc8usb-1.0.0.tar.gz
Size 8.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a83ef94d7eb890ded56868c915407a232f7672f049cd97376587f85e5ace51ee
BLAKE2b-256 checksum
How to use checksums
3cf64e77d061050ca349a2454751da8a6b089ad50f163b39042962f8f79d42b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

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

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

Security for stc8usb 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