Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /DISK2/WWW/avr-elektronika.tk/www/lib/smarty/Smarty_Compiler.class.php on line 270

Xmega programmer using the USBasp device

Manual. Návod na programovanie xmega pomocou USBasp  programátora a avrdude. - PDI.

Stiahni (Download manual and source code of PDI programmer) návod - manual and source - PDI programmer.  Schéma, hex súbor, avrdude, obrázky (schematics, hex file, program, pictures).

schéma  

Ak máte dlhé prívody (PDI_data a PDI_clk), vplyvom kapacít môže občas dôjsť k chybám pri programovaní a vypíše "verification failed", alebo zle načíta zariadenie "device signature"...

Make the wires (PDI_data and PDI_clk) as short as possible! Otherwise it can show error like "verification failed"...

Wiring diagram: Schéma:

K USBasp programátoru je treba použiť tento adaptér (prevodník). Zenerove diódy slúžia na prispôsobenie napäťových úrovní.

The USBasp programmer need to use this adapter (converter). Zener diodes are used to adapt the voltage levels.

schéma 

Programming via avrdude (from command line):

Programovanie xmega128a3 z príkazového riadku.  (How to program the xmega). USB 2.0, 1.0

Download patched avrdude supporting PDI programming v 5.11 svn.

avrdude -C avrdude.conf -c usbasp -p x128a3 -U flash:w:"your-hex-file.hex":a  -E noreset

 

command line  

NOTE: Not work on USB v 3.0

Poznámka: Nefunguje na USB porte v 3.0.

 

Programming via GUI for avrdude:

Modifikovaný program pre programovanie procesorov Xmega cez PDI.
Modified program for programming the XMEGA through PDI.

.NET Framework 2.0 is needed.

Download the GUI4avrdude with fusecalculator GUI4avrdude v.2014.01.20  (cca. 12Mb) Downloads: 3510x [ DOWNLOAD .zip]

GUI4avrdude must use this version of avrdude 5.11 svn 

Setup:
gui4avrdude setup
Before using "Search" function you should select any xmega device.

In tab "Options" you must select "-E noreset".
avr programmer

Easy programming:

gui4avrdude programming 
old source code: avrdude-GUI 

.NET Framework 2.0

NOTE: Not work on USB v. 3.0
Poznámka: Nefunguje na USB porte v. 3.0.

Source informations from: http://szulat.blogspot.sk/2012/08/atxmega-programmer-for-050.html
                                          http://yuki-lab.jp/hw/avrdude-GUI/

How to patch (add pdi support for USBasp) and compile the avrdude

    I recommend 32 bit OS.
1. download the program MinGW (mingw-get-setup.exe 85kB) and install it (1,12GB), 
    or download MinGW.zip, unpack to c: and run it as Admin by run.bat.
2. download the source of avrdude and unpack it to your hard drive in MinGW folder.
3. download the patch: *.diff.
4. run the MinGW using this syntax: C:\MinGW\msys\1.0\msys.bat  (type your own path to MinGW and run as Admin).
5. set the path to avrdude source code, patch and compile it inside the MinGW window.
    Type this (without $ ) and hit ENTER:
    $ cd c:
    $ cd MinGW
    $ cd avrdude-6.0.1
    $ patch <c:/usbasp-pdi-usbaspfirmware-20120816.diff
    $ ./bootstrap
    $ ./configure
    $ make
    $ make install

 
6. You can add missing library to MinGW.

     From "libusb-win32-bin-1.2.6.0"
     include\lusb0_usb.h    -> C:\MinGW\include\
     lib\gcc\libusb.a -> C:\MinGW\lib\
     bin\x86\libusb0_x86.dll (or other depending on your OS) -> C:\MinGW\bin\

7. You have patched avrdude.exe and avrdude.conf in folder avrdude-6.0.1.
    Download patched avrdude v 6.0.1 supporting PDI programming via USBasp .
    Work for xmega procesors and others.
    New version (6.1/2014) patched avrdude 6.1 supporting PDI programming via USBasp programmer.

8. Try to add other drivers:

    - It is not working with includes drivers for libusb1 and ftdi ... why?


Wish you succesful work...

Testing board

This Xmega board was programmed:

schéma  

LIBRARY FOR Xmega processors:

Knižnica pre Xmega128A3 - USART, I2C, SPI

 

Links:

xmega tutorials:

http://asf.atmel.com/docs/latest/xmegab/html/adc_quickstart.html

http://www.batsocks.co.uk/readme/XMegaExamples.htm#XTV2 -TV text xmega

http://www.jtronics.de/avr-projekte/xmega-tutorial.html -xmega tutorial: I2C, USART, SPI, I/O...

http://www.bostonandroid.com/EVAL-USB-128.html

http://www.bostonandroid.com/manuals/xmega-precision-adc-howto.html

http://handheld-i2c-analyzer.googlecode.com/svn-history/r108/trunk/i2c-driver.c

http://www.mil.ufl.edu/5666/handouts/AVR_ATXMega128A1_ADC_PWM.pdf

http://www.cs.mun.ca/~paul/cs4723/material/AVR/AVR1509/

http://kampis-elektroecke.de/?page_id=876

http://tomeko.net/other/avrdude/building_avrdude.php

 

 


Previous page: LIB
Nasledujúca stránka: STK500 bootloader