AC-PG-USBASP USBASP AVR Programmer User Guide

AC-PG-USBASP USBASP AVR Programmer User Guide
AC-PG-USBASP USBASP AVR Programmer
User Guide
Version 1.2
26 April 2010
AC-PG-USBASP-UG
AC-PG-USBASP USBASP AVR Programmer
User Guide
Version 1.2
26 April 2010
TABLE OF CONTENTS
1. OVERVIEW .......................................................................................................................... 1
1.1.
Introduction ............................................................................................................. 1
1.2. References .............................................................................................................. 1
1.2.1. Referenced Web Pages ................................................................................... 1
1.2.2. Acronyms and Abbreviations ............................................................................ 1
1.3.
Supported Microcontrollers ...................................................................................... 2
1.4.
Warnings ................................................................................................................. 3
2. LAYOUT .............................................................................................................................. 4
2.1.
USB Type A............................................................................................................. 4
2.2.
ISP – 10 pin IDC...................................................................................................... 4
2.3.
J1 – Supply Target .................................................................................................. 5
2.4.
LEDs ....................................................................................................................... 5
3. USING THE PROGRAMMER ................................................................................................... 6
3.1. Connecting the programmer to your computer......................................................... 6
3.1.1. Windows Vista (32 Bit) ..................................................................................... 6
3.1.2. Windows XP (32 bit) ......................................................................................... 9
3.1.3. Other operating systems ................................................................................ 12
3.2. Downloading firmware to your microcontroller ....................................................... 12
3.2.1. Required Items ............................................................................................... 12
3.2.2. Assumptions .................................................................................................. 12
3.2.3. Procedure ...................................................................................................... 13
3.2.4. More information ............................................................................................ 13
4. COMMENT AND QUESTIONS ............................................................................................... 14
iii
AC-PG-USBASP USBASP AVR Programmer
User Guide
Version 1.2
26 April 2010
TABLE OF TABLES
Table 1. Referenced Documents ........................................................................................................... 1
Table 2. Acronyms and Abbreviations ................................................................................................... 2
Table 3. Supported Microcontrollers ...................................................................................................... 2
TABLE OF FIGURES
Figure 1. Device Layout ........................................................................................................................... 4
Figure 2. 10 Pin ISP pinout ..................................................................................................................... 4
Figure 3. LEDs ......................................................................................................................................... 5
Figure 4. Driver Installation on Vista 32 bit – Found new hardware ....................................................... 7
Figure 5. Driver Installation on Vista 32 bit - Found New Hardware – USBasp ..................................... 7
Figure 6. Driver Installation on Vista 32 bit – Windows couldn’t find driver software for your device..... 8
Figure 7. Driver Installation on Vista 32 bit – Browse for driver software ............................................... 8
Figure 8. Installation on Vista 32 bit – Security warning ......................................................................... 9
Figure 9. Installation on Vista 32 bit – Confirmation ............................................................................... 9
Figure 10. Installation on Windows XP – New Hardware Wizard ......................................................... 10
Figure 11. Installation on Windows XP – Insert CD or install from specific location............................. 10
Figure 12. Installation on Windows XP – Specify Location................................................................... 11
Figure 13. Installation on Windows XP – Driver installation ................................................................. 11
Figure 14. Installation on Windows XP – Installation Confirmation ....................................................... 12
Figure 15. AVRdude writing a flash image to the microcontroller ......................................................... 13
iv
AC-PG-USBASP USBASP AVR Programmer
User Guide
Version 1.2
26 April 2010
1.
Overview
1.1.
Introduction
USBasp is a USB in-circuit programmer for Atmel AVR controllers. It simply consists of an
ATMega8 and a few passive components. The programmer uses a firmware-only USB driver, no
special USB controller is needed.
Some of the key features include:
a.
Works under multiple platforms. Linux, Mac OS X and Windows are tested,
b.
Programming speed is up to 5kBytes/sec, and
c.
SCK option to support targets with low clock speed (< 1,5MHz).
1.2.
References
1.2.1.
Referenced Web Pages
The web pages referenced in this User Guide are listed in Table 1.
Name
Address
USBasp - USB programmer for Atmel AVR controllers
http://www.fischl.de/usbasp/
AVRdude
http://savannah.nongnu.org/projects/avrdude/
AVRdude Documentation
http://www.nongnu.org/avrdude/usermanual/avrdude.html
V-USB
http://www.obdev.at/products/vusb/index.html
WinAVR
http://winavr.sourceforge.net/
MacAVR
http://www.harbaum.org/till/macavr/index.shtml
Table 1. Referenced Documents
1.2.2.
Acronyms and Abbreviations
The acronyms and abbreviations utilised in this User Guide are listed in Table 2.
1
AC-PG-USBASP USBASP AVR Programmer
User Guide
Version 1.2
26 April 2010
Acronym and Abbreviation
Description
AVR
According to Atmel, AVR stands for nothing, it's just a name. Others say
it stands for Advanced Virtual RISC. However, the inventors of the AVR
series chips are named Alf Egil Bogen and Vegard Wollan, so you be the
judge.
IDC
Insulation Displacement Connector
ISP
In System Programmer
LED
Light Emitting Diode
RISC
Reduced Instruction Set Computing
SCK
Slow Clock
SIL
Single in Line
SPI
Serial Peripheral Interface
USB
Universal Serial Bus
Table 2. Acronyms and Abbreviations
1.3.
Supported Microcontrollers
Table 3 lists the microcontrollers that are supported by the USB AVR Programmer.
Supported Microcontrollers
Mega Series
ATmega8
ATmega48
ATmega88
ATmega168
ATmega328
ATmega103
ATmega128
ATmega1280
ATmega1281
ATmega16
ATmega161
ATmega162
ATmega163
ATmega164
ATmega169
ATmega2560
ATmega2561
ATmega32
ATmega324
ATmega329
ATmega3290
ATmega64
ATmega640
ATmega644
ATmega649
ATmega6490
ATmega8515
ATmega8535
ATtiny12
ATtiny13
ATtiny15
ATtiny25
ATtiny26
ATtiny45
ATtiny85
ATtiny2313
AT90S1200
AT90S2313
AT90S2333
AT90S2343
AT90S4414
AT90S4433
AT90S4434
AT90S8515
Tiny Series
Classic Series
AT90S8535
Can Series
AT90CAN128
PWN Series
AT90PWM2
AT90PWM3
Table 3. Supported Microcontrollers
2
AC-PG-USBASP USBASP AVR Programmer
User Guide
Version 1.2
26 April 2010
1.4.
Warnings
Some of the components discussed in this document are very sensitive to electrical
static discharges. The reader should take precautions to ensure that components are
protected against these discharges.
Whilst the voltages typically seen in microcontroller circuits are low, the reader
should be aware of the risk of working with electrical circuits and take necessary
precautions.
3
AC-PG-USBASP USBASP AVR Programmer
User Guide
Version 1.2
26 April 2010
2.
Layout
The layout of the USBASP programmer is shown in Figure 1.
Figure 1. Device Layout
2.1.
USB Type A
The USB end of the programmer connects directly into your computers USB port.
2.2.
ISP – 10 pin IDC
The 10 pin ISP connection provides an interface to the microcontroller. This interface uses a 10 pin
IDC connector and the pinout is shown in Figure 2
(MOSI) 1
2 (VCC +5V)
(GROUND) 3
4 (GROUND)
(RESET) 5
6 (GROUND)
(SCK) 7
8 (GROUND)
(MISO) 9
10 (GROUND)
Figure 2. 10 Pin ISP pinout
4
AC-PG-USBASP USBASP AVR Programmer
User Guide
Version 1.2
26 April 2010
2.3.
J1 – Supply Target
If this jumper is bridged, then +5V supply from the USB port will go tho the target device via the ISP
VCC connector. Disable this jumper if the target device has its own power source.
2.4.
LEDs
The USBASP programmer has 2 LEDs near the ISP connection. These have the following functions:
a.
LED 1 – Programmer communicating with target device
b.
LED 2 – Power
Figure 3. LEDs
5
AC-PG-USBASP USBASP AVR Programmer
User Guide
Version 1.2
26 April 2010
3.
Using the Programmer
3.1.
Connecting the programmer to your computer
Connecting the programmer to your computer comprises of 2 steps:
a.
Physically connecting the programmer to the USB port, and
b.
Installing drivers in order for it to work.
Whilst the USBasp programmer will work on a wide variety of operating systems, this procedure will
focus on Widows Vista 32 bit and Windows XPs
3.1.1.
3.1.1.1.
Windows Vista (32 Bit)
Required items
Items required to run this procedure are:
a.
USBasp programmer
b.
Computer with USB port and Windows Vista 32 bit installed
c.
USBasp drivers downloaded and unzipped from
http://www.protostack.com/download/USBasp-driver-0.1.12.2.zip
3.1.1.2.
Assumptions
This procedure assumes that:
a.
The logged in user has sufficient permissions to install unsigned device drivers
3.1.1.3.
Procedure
To install the USBasp programmer:
a.
Insert the programmer into an available USB port
b.
When the “Found New Hardware” dialog opens, select “Locate and install driver sotware
(recommended)”
6
AC-PG-USBASP USBASP AVR Programmer
User Guide
Version 1.2
26 April 2010
Figure 4. Driver Installation on Vista 32 bit – Found new hardware
c.
Wait while Windows Vista attempts to locate a driver
d.
When the “Found New Hardware – USBasp” dialog box is displayed, select “I don’t have the
disc. Show me other options”
Figure 5. Driver Installation on Vista 32 bit - Found New Hardware – USBasp
7
AC-PG-USBASP USBASP AVR Programmer
User Guide
Version 1.2
26 April 2010
e.
On the next screen select “Browse my computer for driver software (advanced)”
Figure 6. Driver Installation on Vista 32 bit – Windows couldn’t find driver software for your
device
f.
Click Browse and select the folder where you unzipped the USBasp drivers, then click Next
Figure 7. Driver Installation on Vista 32 bit – Browse for driver software
g.
When the windows security dialog box is opened, select “Install this driver software anyway”.
Note: This security warning is raised because the device driver files are not signed with a
digital certificate. This does not mean that the file will cause a security problem, but rather that
windows cannot guarantee it source. Click on “see details” for more information.
8
AC-PG-USBASP USBASP AVR Programmer
User Guide
Version 1.2
26 April 2010
Figure 8. Installation on Vista 32 bit – Security warning
h.
When the installation is complete, a confirmation screen will be displayed. Click close to close
it.
Figure 9. Installation on Vista 32 bit – Confirmation
i.
Your programmer is now ready for use
3.1.2.
3.1.2.1.
Windows XP (32 bit)
Required items
Items required to run this procedure are:
a.
USBasp programmer
b.
Computer with USB port and Windows XP 32 bit installed
c.
USBasp drivers downloaded and unzipped from
http://www.protostack.com/download/USBasp-driver-0.1.12.2.zip
9
AC-PG-USBASP USBASP AVR Programmer
User Guide
Version 1.2
26 April 2010
3.1.2.2.
Assumptions
This procedure assumes that:
a.
The logged in user has sufficient permissions to install unsigned device drivers
3.1.2.3.
Procedure
To install the USBasp programmer:
a.
Insert the programmer into an available USB port
b.
When the “New Hardware Wizard” dialog box is displayed, select “No, not this time” then
click Next
Figure 10. Installation on Windows XP – New Hardware Wizard
c.
On the next page select “Install from a list of specific location (Advanced)” then click Next
Figure 11. Installation on Windows XP – Insert CD or install from specific location
d.
On the Search and Installation options page
(1)
Ensure that “Include this location in the search” is checked,
10
AC-PG-USBASP USBASP AVR Programmer
User Guide
Version 1.2
26 April 2010
(2)
Click Browse and select the folder where you unzipped the USBasp drivers, then
(3)
Click Next
Figure 12. Installation on Windows XP – Specify Location
e.
Wait for the driver to install
Figure 13. Installation on Windows XP – Driver installation
f.
When the installation is complete, a confirmation screen will be displayed. Click close to close
it.
11
AC-PG-USBASP USBASP AVR Programmer
User Guide
Version 1.2
26 April 2010
Figure 14. Installation on Windows XP – Installation Confirmation
g.
Your programmer is now ready for use
3.1.3.
Other operating systems
USBasp works under other operating systems such as Mac OS X and Linux, by drivers are not
provided by Protostack nor are installation instructions included in this user’s guide.
The USBasp programmer uses the AVR-USB library and driver source code can be downloaded this
page http://www.obdev.at/products/avrusb/index.html .
Mac users may also want to look at http://www.harbaum.org/till/macavr/index.shtml .
3.2.
Downloading firmware to your microcontroller
3.2.1.
Required Items
Item required for this procedure include:
a.
USBasp programmer,
b.
Computer with USB port and AVRdude software installed,
c.
Precompiled firmware to be loaded,
d.
10 pin or 6 pin ISP cable, and
e.
AVR Microcontroller with ISP interface wired to it (e.g. an AVR microcontroller on a
Protostack 29 pin AVR board)
3.2.2.
Assumptions
This procedure assumes that
a.
The procedure is being executed on Microsoft Windows XP or Windows Vista,
b.
AVRdude is in the path,and
12
AC-PG-USBASP USBASP AVR Programmer
User Guide
Version 1.2
26 April 2010
c.
USBasp drivers have already been installed.
3.2.3.
Procedure
To download the firmware to your microcontroller:
a.
Insert the programmer into an available USB port
b.
Open a command prompt
c.
Enter the following command where
(1)
<DEVICE> is the micro controller type you are programming (eg ATMEGA8), and
(2)
<FILE> is the filename of the precompiled binary file
avrdude -p <DEVICE> -P usb -c usbasp
-U flash:w:<FILE>
Figure 15. AVRdude writing a flash image to the microcontroller
3.2.4.
More information
Please refer to the AVRdude documentation at http://www.nongnu.org/avrdude/usermanual/avrdude.html for more information.
13
AC-PG-USBASP USBASP AVR Programmer
User Guide
Version 1.2
26 April 2010
4.
Comment and Questions
If you have any questions or comments regarding this documentation or any of our products, please
post to the Protostack forum at http://www.protostack.com/forum/. The forum will allow you to
interact with peers and are constantly monitored by our support engineers.
14
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement