|
USBTiny-MkII SLIM programmerfile:///C:/Documents%20and%20Settings/Administrator/桌面/USBTiny-MkII%20SLIM%20programmer/USBTiny-MkII%20SLIM%20programmer%20%20Manekinen%20DIY_files/calendar.png 29 July 2011 | | Dodał manekinen
USBTiny-MkII SLIM programmer (AVRISP-MKII clone) supports all Attiny, Atmega, and Xmega µcontrollers. It has three programming interfaces: ISP, PDI, and TPI. It works with AvrStudio or AvrDude. Small convenient board, contains double direction voltage translator for all interfaces and working from 1,2V, jumper for target chip voltage selection 5V or 3,3V (LDO stabilizer), and status LEDs. The heart of the device is a AT90USB162 controller with hardware USB, so it can provide fast programming speeds.
About:
Circuit built and based on LUFA project (link), programmer inspired by USBTiny-MKII (link), and USBTiny MKII PL (link). I used MAX3002 in place for original GTL2003 translator, exactly like author of the PL version – this chip is more available. This change also need a change of code, which is described in last link – code in attachment is already moded – original will work incorrectly.
Programmer has a three IDC 6pin sockets to provide support for three programming protocols: ISP, PDI, and TPI. They allows to programm all of available Atmega, Attiny, and Xmega chips. PCB just looks complicated, but it can be also homemade. Vias are not placed under chip or other elements so they can be made with a wire. Vias placed under the at90usb162 chip derives its other free pins to pads on the bottom side of pcb – so circuit can be used also as a test board for other codes using hardware USB. Code change is very simple, it is made trough built-in USB bootloader and free tool from Atmel – FLIP.
Under IDC sockets a voltage selection jumper is placed – you can select voltage which can be used to power your target chip. Short the 1 and 2 for 5V, or 2 and 3 for 3,3V. For voltage reduction, LDO MCP1825S-3302ED stabilizer is used – but you can use any pin-compatible one, like LF33. Removed jumper will disconnect voltage from the “translated” side, and you have to provide this voltage from target chip to allow programmer to work.
I won’t write about programming, everybody knows how it works. Programmer can be used from AvrStudio or AvrDude. Disadvantage is that, we must choose with which software we want to use it – but changing form one to another is just a matter of minutes
Launching:
After correct soldering, connect your programmer to USB port. You will see a notification that your PC found a new device called “AT90USB162 DFU”. Download and install the FLIP software from Atmel. Then, install DFU drivers from Atmel\Flip\usb\ folder. After correct install, start FLIP, click on the “chip” icon, and select at90usb162 from the list. Then, click on the 2nd “usb cable” icon, select USB, and OPEN in next window. FLIP should detect your chip with no problem – if it can’t (you get error message), it means that you did something wrong. You can reinstall the driver, connect to another usb port, or reboot your system.
If you chip is brand new (empty) then after connect it will automatically start in bootloader mode. If you want to upgrade firmware, then put the HWB jumper on, and short RST pins. Chip will start in bootloader mode. Jumper can be removed.
If we want to compile the code for our own, we will need only WinAvr in 2010-01-10 version. Select make clean and then make all – that’s it. But we can choose here the software under which we want to compile the firmware. If we want to use it with AvrDude, then open the makefile file and add following line:
CDEFS += -DLIBUSB_DRIVER_COMPAT
Next step is to send our firmware to chip. Click on the first “open book” icon and select our HEX file. Then hit the RUN button. We should have checked the “erase”, “program”, and “verify” checkboxes. Code will be written very fast. Now, just reconnect programmer to usb port – or short the RST pins, and you should get two LEDs lit.
After that, PC will detect new device LUFA AVRISP MkII CLONE – it’s time to install driver for this. If we want to use programmer with AvrStudio, install driver from Atmel\AVR Tools\usb\ folder – this folder is created when installing AvrStudio. But if we want to us it with AvrDude, then install the LIBUSB driver. Unpack files, run inf-wizard app, select our programmer from list, save created file, and click on install now or use windows installer. LED1 should light up – this means that programmer is ready to work – congratulations, that’s it.
In AvrStudio, click on the Con button, then select AVRISP mkII from list, and hit connect.
In AvrDude, change your programmer type in command line for:
-c avrisp2 -P usb or -c avrispmkII -P usb.
Attention:
Programmer in current version will not work with ISP if these lines are loaded with resistance in target chip board, resistance stronger than 22K for pullup, or resistance stronger than 10K for pulldown.
原理图和固件还有源代码
mkii_slim.rar
(855.41 KB, 下载次数: 72)
|
|