USB Programming Tool for STC8H8KxxU Microcontrollers
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file stc8usb-0.2.1.tar.gz
.
File metadata
- Download URL: stc8usb-0.2.1.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5832124611b9a60b2c82f09538169f8e521f510b3b0a9b0f80b6c53ea784af04 |
|
MD5 | dac9b244ae2aa0d28fc9c890fa07786b |
|
BLAKE2b-256 | 0ac73cfeb05a60e0878808dff7df4b8eef8e4114bf2725f9962896d96a2665b0 |
File details
Details for the file stc8usb-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: stc8usb-0.2.1-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | caa37ab327fd2b222e7cd299f48e8870b9f3f84d8c4eb10c2a19f86c98c03061 |
|
MD5 | 4bafdfeba750fffba255c8ef3a28f2d7 |
|
BLAKE2b-256 | 4da909c17dfff2cff872236e1bcada407ecc302cbffe5b12a918f25b8c3207f0 |