USB-AtmelPrg: Wolfgang's Universal Interface CableUSB-AtmelPrg is my self-developed USB-based "universal" interface "cable" providing all features I need when designing with programmable devices (AVR 8-bit RISCs via SPI, XILINX CPLDs and 32-bit ARMs via JTAG port). These pages describe all you need to build and use this device including host software and full circuit diagrams. Purpose and FeaturesFor an overview on what programmable devices are, what an interface cable is and why you need it, please see the parent page. If you don't understand the name USB-AtmelPrg, read about its history. Basically, USB-AtmelPrg is my self-developed USB-based "universal interface cable" connecting a host computer to the programmable device such as a microcontroller or a CPLD. Most such cables on the market are proprietary and expensive. In contrast, USB-AtmelPrg is inexpensive and free and still provides all functionality I need. Here is a list of features:
Note: USB-AtmelPrg is actually a USB to JTAG and SPI converter board but still I call it "interface cable" because in the end, it's just a very thick cable with a USB plug on one end and a SPI/JTAG plug on the other end. Interface Cable Circuit
Firmware for the Interface CableThe circuit makes use of an ATMega8 AVR RISC microcontroller which itself needs to be programmed before the electronics in the interface cable is fully operational. This is a quirk anybody who likes to build this own USB-AtmelPrg has to be aware of. This means that you already need a working programmer for an Atmega8 chip to build the USB-AtmelPrg interface cable (which in turn, once operational, can be used to program further such microcontrollers). In theory, it should be possible to program the ATMega8 controller in the cable circuit using the "bitbang" mode of its own USB controller but this has not been tested yet. Hence, if you do not have any means to program an ATMega8 controller, and do not want to experiment with "bitbang mode programming", you cannot build a USB-AtmelPrg interface cable. Wonder how I got mine running in the first place? See history. External Level Converter for 3.3V Logic Devices
Host Software for USB-AtmelPrg: usb-atmelprg, OpenOCDThere is not just a single piece of software for the USB-AtmelPrg interface cable but what software to apply depends on what you want to do:
All this software is available for free and runs natively under Linux; OpenOCD also supports Windows. For Those Interested: Some Remarks on USB-AtmelProg's HistoryFor quite some time, I was using my home-made parallel-port based programmer which merely existed as a put-together circuit scattered over several boards (which can be seen in the image below showing USB-AtmelPrg during testing connected to the parport-based AVR programmer). As this is not really a movable plug-n-play system and since the parallel ports are slowly vanishing from the mainboards (and laptops), a better solution had to be found. One day during the time I was working for the quantum optics group at the LMU where I designed AVR-RISC-based devices and programmed them at home, (while walking for lunch) it was decided that a better programmer finally needed to be built: One for me and one for the university... And that's the date of birth of USB-AtmelPrg and also explains how this interface cable got its name "USB-AtmelPrg". Nearly a year later, I wanted to program and use a CPLD from XILINX and decided to additionally implement SVF downloading so that the CPLD could be programmed via its JTAG port. (This works because JTAG has 3 output and 1 input line just as the SPI used to talk to AVRs.) Furthermore, I added the external 3.3V level converter since the 3.3V XC9500XL family is much cheaper than 5V XC9500 family. Again a year later, I saw that Reichelt (a german electronics distributor) sells 32-bit ARM microcontrollers with integrated flash and SRAM for below EUR 10. Having occasionally thought about how to upgrade to a highly integrated microcontroller offering more computing power than usual AVRs, I deciced to take a look at the AT91SAM7S64. Therefore, I patched OpenOCD so that it can use the USB-AtmelPrg cable to program and debug the attached ARM.
|