Using the Minipro TL866CS Universal Programmer
I wanted to program a couple PICs(16F54) and an EEPROM. This minipro programmer looked promising, cheap and there seemed to be some open source support for it. I ordered it off Amazon. It looked great nice action on the ZIF socket. It took a little wrangling to get the software where I wanted it. This is that process.
Tools
- My PC running Debian Jessie GNU/Linux
- TL866CS Programmer
- The open source minipro software tool available at [https://gitlab.com/DavidGriffith/minipro/]
- The TLA866 firmware updater available at [https://github.com/radiomanV/TL866]
- Autoelectric official software version 6.10 w/ firmware version 3.2.63 [http://www.autoelectric.cn/minipro/minipro_setup.rar]
Using the open source minipro software
Installing the open source minipro software was straight forward and worked as advertised. It does however complain that the firmware is out of date. At least on my programmer it did.
It can be run from the build directory, but it is better if a deb is created or it is fully installed with make install.
To get all the build dependencies I needed to as root:
apt-get install fakeroot dpkg-dev libusb-1.0-0-dev
To create a deb, the recommended command did not work for me. I had to log in as root then run:
fakeroot dpkg-buildpackage -b -us -uc
If you install it by either running make install or by creating a deb package you will have access to its man page which covers all its usage.
The tool can use either raw bin files or standard hex files. I prefer the hex files as they are easier to hand edit. At least for the PIC16f54 I'm using the tool requires a full-size image. If you just tack a byte onto the end of the address space in the hex file that solve the problem. I added this ":0103FF0000FD" as the second to last line.
The basics of the command is
miniprohex -p PART-NAME -w FILENAME
change -w to -r to read the part into the file instead.Use
minipro -l
to get the list of supported parts to try to find the one you are trying to program.
Updating the firmware
If you want to remove the nagging about the firmware problem or make sure you get full support you will need to update the firmware.
If you have access to a windows machine with the official software and connect it to the tool once it will automatically update the firmware, if you want to do it the easy way.
Using the open source firmware updater is a little tricky, and may brick your device, but the minipro does have a boot loader that can be used to update even if the re-flash fails. Actually for me the initial re-flash failed. I just restarted the minipro by pulling the USB cable and plugging it back in. It went into the boot loader, and I was able to re-flash it again and it took.
The open source firmware updater tool requires the latest version of the firmware image. When you install the windows tool it creates it as a file called update.dat. You can install the windows version under wine to get it to extract the file. You can get the latest version either from the autoelectric link above or below.
The Firmware updater can be downloaded from github above. It is built using QT creator. If you open the .pro project file and hit the run button you will get a dialog.
In the Dialog browse to the update.dat file from the official tool.
Select the correct model(for me it was TL866CS) from the radio buttons.
Hit The flash button. You should see the indicator on the dialog flash. It will tell you when it is complete. For me this locked up the first time I tried it. I reset the flash programmer after giving it 15 minutes to be sure it was stuck. When it restarted the flash programmer could not identify the model programmer I had and said it was stuck in the boot loader. This was fine though as it allowed me to try to flash it again and it worked the second time.
Reference
- EEVBLOG Review at [https://www.youtube.com/watch?v=FLG03f_ua5g]
- Windows Tutorial at [https://www.youtube.com/watch?v=XjM2bxSmAlg]
- the official minipro software site in Chinese [http://www.autoelectric.cn/minipro/MinProUpdate.htm]
- The TLA866 firmware updater instructions [http://minipro.txt.si/index.php?title=Firmware_Updater_Tool]
- The TLA866 firmware updater details [http://static.minipro.txt.si/mirror/docs/TL866_design.pdf]
- Old GitHub source repo [https://github.com/vdudouyt/minipro]
- New GitLab source repo [https://gitlab.com/DavidGriffith/minipro/]