USBTinyISP in circuit AVR Atmel programmer (HCARDU0002)

Atmel microcontroller development boards and accessories
admin
Site Admin
Posts: 865
Joined: Sun Aug 05, 2012 4:02 pm

USBTinyISP in circuit AVR Atmel programmer (HCARDU0002)

Post by admin » Wed Mar 13, 2013 3:55 pm

Image


This USBTinyISP programmer is ideally suited for in circuit programming of AVR devices or for reflashing bootloaders onto Arduino based products. It includes a 6 and 10 pin SPI interface and cables. The 6 pin interface is designed to connect directly to the 6 pin ICSP found on Arduino boards such as the Uno, Mega, Nano, etc. This board also works great with the Arduino development environment, AVR studio and avrdude.


Programmer includes:

1x USBTinyISB compatible programmer

1x 6 way IDC cable
1x 10 way IDC cable

Order Yours Here.

FAQ:

What are the pinouts on the ICSP connectors?

6 pin header:
1......MISO
2......VCC
3......SCK
4......MOSI
5......RST
6......GND

10 pin header:
1......MOSI
2......VCC
3......N/A
4......GND
5......RESET
6......GND
7......SCK
8......GND
9......MISO
10....GND


Image





Windows Driver Installation

With most customers now using 64 bit versions of windows we recommend installing the driver using the Zadig driver install utility. Using this utility will help avoid problems caused by Windows Signed Driver Enforcement interfering with driver installation. To install the driver please follow the steps below:

1) Download the Zadig utility below:
zadig2_4.zip
[PLEASE LOGIN TO DOWNLOAD]


2) Connect your TinyUSB to the computer using the supplied USB cable. Windows may complain that it cannot find a driver but just ignore this message.

3) Unzip the downloaded file and from the unzipped folder double click the Zadig.exe executable.

4) The Zadig utility should now open up. In the drop-down box at the top of the window you should be able to select the USBTiny programmer (see image below).

If you don't see it listed then go to Options->List all devices and try the drop down box again. If you are still unable to see the programmer listed under 'USBtiny' then remove and reinsert the programmer and try again.

You can confirm that you have the right device selected by checking that the USB ID text box is showing the correct VID and PID (1781 & 0CF9). Also make sure you have libusb-win32 (v1.2.x.x) selected for the driver driver version. You settings should now look similar to the following image:
Zadig_USBTiny.png

5) Click the 'Install Driver'. This will automatically install a driver for the TinyUSB. You can now close the Zadig utility.

6) Important: For the driver to finish installing properly you will need to disconnect the programmer and reconnect it.





FAQ:

How do I access the programmer from the Arduino IDE?

By default the Arduino IDE supports the USBTiny programmer. To program your board using the USBTiny select your board type as normal and then under Tools->Programmer select USBTinyISP for the programmer type.

Then to program your Arduino with your current sketch click the upload button as normal, but whilst doing so hold down the shift key. You will also notice that whilst holding the shift key when you hover over the upload button it will say 'Upload using programmer'.

Note that when uploading sketches using the programmer only the sketch will be uploaded, not the bootloader. If at any point you need to reprogram the bootloader back into your Arduino then use Tools->burn bootloader making sure you have the correct board type set.


How do I use this programmer with AVR Studio?
You can program a device from within AVR Studio via the AVRDude command line tool. You will need to download this program separately to AVR Studio. A link to the official site can be found at the bottom of this post. Once downloaded you should have a ZIP file containing an executable called AVRDude.exe. Unzip this to somewhere convenient such as c:\AVRDude\

In AVR Studio go to Tools-> External Tools

You can then add a command line to AVRDude for whatever devices you wish to program. For example if you wish to program an ATMega328p add the following:

Title: AVRDude ATmega328p
Command: C:\avrdude\avrdude.exe
Arguments: -c usbtiny -p atmega328p -U flash:w:$(TargetDir)$(TargetName).hex:i
Initial directory:


You can also tick the optional ' Use Output window' tick box. Save this and under the tools menu you will now see an entry for the external tool you have just added. In this case 'AVRDude ATmega328p'. Selecting this entry will program your device with the compiled HEX file in your currently open project.



External Tools:
AVRDude can be downloaded from the official project site here: http://savannah.nongnu.org/projects/avrdude





Libraries, example code, and diagrams are provided as an additional free service by Hobby Components and are not sold as part of this product. We do not provide any guarantees or warranties as to their accuracy or fitness for purpose.

Descriptions and diagrams on this page are copyright Hobby Components Ltd and may not be reproduced without permission.
You do not have the required permissions to view the files attached to this post.

crashmeplease
Posts: 2
Joined: Sat Mar 23, 2013 10:53 am

Re: USBTinyISP in circuit AVR Atmel programmer (HCARDU0002)

Post by crashmeplease » Thu Apr 25, 2013 3:45 pm

I've been using this with AVRDude on Ubuntu 12.x to program both an Arduino Mega2560 board and bare ATtiny85 ic's using the command line...

Code: Select all

    avrdude -c usbtiny -C /etc/avrdude.conf -p m2560 -U flash:w:myprogram.hex
m2560 = Arduino Mega2560 board


Hope this helps some people..

Philcol83
Posts: 4
Joined: Fri Dec 12, 2014 11:40 am

Re: USBTinyISP in circuit AVR Atmel programmer (HCARDU0002)

Post by Philcol83 » Fri Dec 12, 2014 10:38 pm

:?: I have just bought one of these programmers from Hobby Components. I have loaded the drivers in Win7 but AVR studio 6 does not see this programmer, how do I make it see it.

andrew
Site Admin
Posts: 1374
Joined: Sun Aug 05, 2012 4:15 pm

Re: USBTinyISP in circuit AVR Atmel programmer (HCARDU0002)

Post by andrew » Sun Dec 14, 2014 6:57 pm

You can use the programmer by adding it as an external tool (Tools ->External tools). You can then pass a command line to AVR dude by adding an external tool. For example to program an ATMega32 with your YourProject.hex:

Title: AVRDude ATmega32

Commands: avrdude.exe

Arguments: -c usbtiny -p atmega32 -U flash:w:YourProject.hex

Initial directory: C:\Users\Andrew\Documents\Atmel Studio\6.1\YourProject\YourProject\Release
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

Philcol83
Posts: 4
Joined: Fri Dec 12, 2014 11:40 am

Re: USBTinyISP in circuit AVR Atmel programmer (HCARDU0002)

Post by Philcol83 » Mon Dec 15, 2014 6:37 pm

:? Many thanks Andrew, some help but...
New to me, what/where is AVRdude? or do I substitute this line for AVR studio.exe?

andrew
Site Admin
Posts: 1374
Joined: Sun Aug 05, 2012 4:15 pm

Re: USBTinyISP in circuit AVR Atmel programmer (HCARDU0002)

Post by andrew » Tue Dec 16, 2014 7:44 am

Sorry, I forgot that AVRDude doesn't come as as part of AVR Studio. I copied it over from my copied of the Arduino IDE. If you have the Arduino IDE already installed then just link to the version of AVRDude in C:\arduino\hardware\tools\avr\bin
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

Philcol83
Posts: 4
Joined: Fri Dec 12, 2014 11:40 am

Re: USBTinyISP in circuit AVR Atmel programmer (HCARDU0002)

Post by Philcol83 » Tue Dec 16, 2014 8:58 pm

:roll: Thanks. I will try and sort this out from here.
Very confusing, need Arduino software, AVRdude and Atmel studio just to programme a chip, wow surprising since it does state that this programmer works with each one of these.
I'll spend a little more time on it but it's not worth any more than that. I'll stick to my PIC's.

andrew
Site Admin
Posts: 1374
Joined: Sun Aug 05, 2012 4:15 pm

Re: USBTinyISP in circuit AVR Atmel programmer (HCARDU0002)

Post by andrew » Wed Dec 17, 2014 11:40 am

Just to clarify my last comment, you don't need the Arduino IDE, it's just if you already have it then you have a copy of AVRDUDE on your system. You can download AVRDUDE directly from the downloads area of the official project site here:

http://download.savannah.gnu.org/releases/avrdude/

Additionally when you add AVRDUDE to the external tools in AVR Studio you should be able to use the variables
$(TargetDir) and $(TargetName) to automatically specify your project path and hex file location. For example if you have downloaded and saved AVRDUDE to a folder on your C drive just add something like this to external tools:

Title: AVRDude ATmega328p
Command: C:\avrdude\avrdude.exe
Arguments: -c usbtiny -p atmega328p -U flash:w:$(TargetDir)$(TargetName).hex:i
Initial directory:

So for the above example you can then just program your device directly from AVR Studio by selecting Tools->AVRDude ATmega328p

I'm going to update the first post to reflect this.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

Philcol83
Posts: 4
Joined: Fri Dec 12, 2014 11:40 am

Re: USBTinyISP in circuit AVR Atmel programmer (HCARDU0002)

Post by Philcol83 » Wed Dec 17, 2014 11:39 pm

:) Ok many thanks for all of your advice on this matter, appreciated.

JRC4558D
Posts: 1
Joined: Wed Oct 15, 2014 10:29 am

Re: USBTinyISP in circuit AVR Atmel programmer (HCARDU0002)

Post by JRC4558D » Tue Mar 28, 2017 10:08 am

Hi Guys,

If it helps, this is the connector needed, in case you are building a AVR interface and you need a ISP connector:

AMPHENOL T821106A1S100CEU Wire-To-Board Connector, Vertical,
2.54 mm, 6 Contacts, Header, T821 Series, Through Hole, 2 Rows.

Cheers.

PS: found it here :) http://hobbycomponents.com/connectors/1 ... r-male-pcb

Post Reply

Return to “Atmel”