Skip to content

Instantly share code, notes, and snippets.

View robinkrens's full-sized avatar

Robin Krens robinkrens

  • The Netherlands
  • 13:23 (UTC +02:00)
View GitHub Profile
@robinkrens
robinkrens / stc32_hid_program.py
Created February 26, 2024 11:53
STC32 USB HID program ISP
# Example on how to use hid to write STC chip series: STC8H8K64U,STC32G12K128,STC32F12K54
# Opens USB HID device and programs flash. No error check. Use at own risk
# Only tested on STC32F12K54
import hid
import time
import struct
from intelhex import IntelHex
from tqdm import tqdm
\documentclass[a4paper,12pt]{article}
\usepackage{fullpage}
\usepackage[latin1]{inputenc}
\usepackage{graphicx}
\usepackage{xspace}
% PDF stuff
\ifx\pdfoutput\undefined
\else
\pdfpagewidth=210mm