Программатор avrisp mkii

Программатор avrisp mkii

Программатор avrisp mkii

Программатор avrisp mkii

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:

mkii_slim_render_topCircuit built and based on LUFA project (), programmer inspired by USBTiny-MKII (), and USBTiny MKII PL (). 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.

WARNING – as it shows, MAX3002 version (1.0) is working poorly when ISP lines are loaded with some resistance or capacitance – do not copy! PCB in 1.1 version with GTL2003 chip, which works like a charm, is available as update below – this pcb works with original firmware.

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 – .

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:

mkii_slim_1After 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 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 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.

Update 2013-03-03:
In the AVRISP-MKII lufa project, more , and the most important are:
Bug fix, which was blocking USB communication after unsuccessful target communication.
Added a function for fast switching between Jungo (Avr/Atmel Studio) and LibUSB (AvrDude) driver, in one FirmWare. Just short the reset pins (you can expand them as a switch on the casing) and device will present itself in the system with a different serial number. Two flashes of LED means that we have Jungo driver, and four, LibUSB driver. In both cases we need to install correct drivers. It is very useful function when using different development environment, previously we had to upload different firmwares to the device and use driver filter.
In addition, programmer remembers the last used mode, and from that mode it start after reconnecting, it also remembers last used SCK speed. Below is a package with compiled code with switching functionality (LUFA 130303). In order to compile the program yourself with the above switching function, you need to define (uncomment) line RESET_TOGGLES_LIBUSB_COMPAT in the AppConfig.h file.

See also:

Gallery:


Files:
DOWNLOAD – Eagle 5.10 files: PCB, SCH, alternative PDFs; compiled HEX files in two versions, full C source code – 110528 version, help files.

DOWNLOAD – Eagle 5.10 files: PCB, SCH, and alternative PDFs for 1.1 version; compiled HEX files in two versions – 111009 version, full C source code – 111009 version, help files.

DOWNLOAD – Eagle 5.10 files: PCB, SCH, and alternative PDFs for 1.1 version; compiled HEX file with toggle function and full C source code – 130303 version, help files.

Current firmware is always available at the at the bottom of the site, project is placed in the Projects/AVRISP-MKII, folder, and it must be compiled before burn. Attachment on my site will not be updated when new LUFA version is released.

4.00 avg. rating (82% score) - 4 votes

.


Источник: http://mdiy.pl/programator-usbtiny-mkii-slim/?lang=en


Программатор avrisp mkii

Программатор avrisp mkii

Программатор avrisp mkii

Программатор avrisp mkii

Программатор avrisp mkii

Программатор avrisp mkii

Программатор avrisp mkii

Программатор avrisp mkii