Open mpogue2 opened 1 month ago
Output of the UPDATE (flash) step:
Configuring upload protocol...
AVAILABLE: custom, stcgal
CURRENT: upload_protocol = custom
Uploading .pio/build/STC8G1K08A/firmware.hex
Loading hex file: Loaded 1112 bytes between: 0000 to 0457
Opening port /dev/tty.usbserial-110: done
Waiting for MCU, please cycle power: detected
MCU type: STC8G1K08A-8PIN
Protocol: STC8G/8H
F/W version: 7.3.13U
IRC frequency(Hz): unadjusted
Switching to 115200 baud, chip: set, host: set, ping: succ
Erasing chip: succ
Writing flash, size 1112: 100.00% done
Hardware needed: STC Auto Programmer USB-TTL
GROUND: pin 1 on STC programmer goes to ISP connector pin 4 (next to the ISP label)
RxD: pin 3 on STC programmer goes to ISP connector pin 2
TxD: pin 5 on STC programmer goes to ISP connector pin 3 (through a DPST switch)
+5: pin 7 on STC programmer goes to ISP connector pin 1 (through a DPST switch)
The DPST switch is needed to interrupt power going to the MCU from the STC programmer, which keeps it in RUN mode, instead of powering up in PROGRAM mode.
To flash:
My hardware setup:
Yeah, that's the closest I could get to a momentary DPST switch. It's not DPST, more like 12PDT, AND it's not momentary. But, it works well enough for my purposes.
Setup needed in Visual Studio Code's view of platformio.ini
ls -al /dev/tty.usb*
to find the STC programmer's nameplatformio.ini
, like this: upload_port = /dev/tty.usbserial-110
Output of the BUILD step: