Using a Xilinx DLC5 Parallel Cable to program an AT89S52
- July 17th, 2010
While working on my control 16 project I realised I would need to replace the firware of the onboard microcontroller, an AT89C52. Unfortunately, the AT89C52 is a mission to program (as it is parallel programmable only) so I have replaced it with an AT89S52, which supports in-circuit serial programming. What I still lacked was an ISP programmer; however, instead of building one I made use of an old Xilinx DLC5 parallel port JTAG cable (schematic). This was fairly straight forward under Ubuntu 9.04, using UISP AVR and AT89S programming software. The following instructions assume the target is self powered and has an oscillator/crystal connected if required. NB these instructions are written from memory, so if you find a mistake please post a comment.
Setup
- Add yourself to the lp group so that you can access the parallel port without needing to be superuser (you will need to log out and back in again after this command):
sudo usermod -a -G lp <username>
- Install uisp:
sudo aptitude install uisp
- Connect the JTAG cable to your target device as follows:
JTAG Target Vcc Vcc GND GND TDI MOSI TDO MISO TCK SCK TMS RST
Some useful UISP commands
These are given for AT89S52, but for other AVR series it should work if you just drop the -d89 flag and use the appropriate part number. The main thing to note here is that the dprog flag is set to xil to indicate we are using a DLC5 for programming.
Erase
uisp -d89 -dprog=xil -dpart=at89s52 --erase
Program
uisp -d89 -dprog=xil -dpart=at89s52 --upload if=[input filename (in intel hex or motorolla srec format)]
Read back
uisp -d89 -dprog=xil -dpart=at89s52 --download of=[output filename (in srec format)]
If you have issues try adding -v=3 or -v=4 for more verbose output from UISP.

No comments yet.