Skip to main content

USB Programming Tool for STC8H8KxxU Microcontrollers

Project description

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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stc8usb-0.2.0.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

stc8usb-0.2.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file stc8usb-0.2.0.tar.gz.

File metadata

  • Download URL: stc8usb-0.2.0.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for stc8usb-0.2.0.tar.gz
Algorithm Hash digest
SHA256 bcfb5747c56ce54f352369ceeb34d8bae2e663514d6ed15a7e0f08774fd2e961
MD5 23434469269e05e11739034b3361f09e
BLAKE2b-256 ee9e3627d975c88a54f7a72e4fe736c2c804b541116cfea1a3b129ece487f09a

See more details on using hashes here.

File details

Details for the file stc8usb-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: stc8usb-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for stc8usb-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c241381da9de9ccedd67f90e7b7d414056f48e995bf0ba69d09462f03803528c
MD5 dd764464f829e960369f860f5a125d3d
BLAKE2b-256 12bb55572fdfbe68a8513347b5950a5210afc0931d3e9ce494b4338f2a7e8b3d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page