I’ve mainly been writing programs for the AT89C2051 (and relatives) using the SDCC compiler under Linux, so it was inconvenient to run my Windows program for communicating with the Arduino, every time I wanted to program a chip.
I’ve now written a Python program, that runs from the command line, so can be used under Linux to communicate with my programmer. It probably works for Windows too (maybe with a slight change to alter the path character from / to \ but I’ve not tried it under Windows at the time of writing.
The program can be downloaded from here: at89prog.py
For convenience, in my Linux Mint distro, I’ve put a copy of it without the .py extension in my /home/martin/bin folder, and set the file permissions to allow the file to be executed: with the shebang up at the top of the file, that auto-runs it under Python 3 on my system, by just typing at89prog from any command line as user martin.
Just execute it without any parameters: python3 at89prog.py or using the shebang method described in the paragraph above. That should display some help on how to use it. A typical command to program a chip (with automatic erase first and verify afterwards is:
at89prog -s /dev/ttyACM0 -p clock24h.hex
Leave a Reply