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.

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

Links

Metadata

Release files for stc8usb 0.2.1

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 0.2.1
File Size Uploaded
stc8usb-0.2.1.tar.gz 6.7 kB Details

Built distribution (wheel)

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

Total release size: 14.3 kB

Release files / stc8usb-0.2.1.tar.gz

Download URL stc8usb-0.2.1.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5832124611b9a60b2c82f09538169f8e521f510b3b0a9b0f80b6c53ea784af04
BLAKE2b-256 checksum
How to use checksums
0ac73cfeb05a60e0878808dff7df4b8eef8e4114bf2725f9962896d96a2665b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

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

Download URL stc8usb-0.2.1-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
caa37ab327fd2b222e7cd299f48e8870b9f3f84d8c4eb10c2a19f86c98c03061
BLAKE2b-256 checksum
How to use checksums
4da909c17dfff2cff872236e1bcada407ecc302cbffe5b12a918f25b8c3207f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

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