Advertisement

Quick Links

Pololu USB AVR Programmer User's Guide
Pololu USB AVR
Programmer User's Guide
1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.a. Module Pinout and Components . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.b. Supported Microcontrollers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.c. Supported Operating Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2. Contacting Pololu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.b. Programming AVRs Using AVR Studio . . . . . . . . . . . . . . . . . . . . . .
3.b.1. Using Advanced Features of AVR Studio . . . . . . . . . . . . . . . . .
3.d. Configuring the Programmer . . . . . . . . . . . . . . . . . . . . . . . . . . .
4. Getting Started in Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.b. Programming AVRs in Linux . . . . . . . . . . . . . . . . . . . . . . . . . . .
5. Communicating via the USB-to-TTL-Serial Adapter . . . . . . . . . . . . . . . . . .
5.a. Communicating via the Serial Control Lines . . . . . . . . . . . . . . . . . . .
6. Measuring Voltages Using the SLO-scope . . . . . . . . . . . . . . . . . . . . . . .
8. Upgrading Firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
© 2001-2010 Pololu Corporation
. . . . . . . . . . . . . . . . . . . . . .
11
16
17
17
21
21
21
24
26
29
32
35
Page 1 of 36

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the USB AVR and is the answer not in the manual?

Questions and answers

Summary of Contents for Pololu USB AVR

  • Page 1: Table Of Contents

    2. Contacting Pololu ........
  • Page 2: Overview

    [http://www.pololu.com/docs/0J6] Important Safety Warning and Handling Procedures The USB AVR programmer is not intended for young children! Younger users should use this product only under adult supervision. By using this product, you agree not to hold Pololu liable for any injury or damage related to the use or to the performance of this product. This product is not designed for, and should not be used in, applications where the malfunction of the product could cause injury or damage.
  • Page 3: Module Pinout And Components

    © 2001–2010 Pololu Corporation 1.a. Module Pinout and Components Pololu USB AVR programmer, labeled top view. The Pololu USB AVR programmer connects to a computer’s USB port via an included USB A to mini-B cable , and it connects to the target [http://www.pololu.com/catalog/product/130]...
  • Page 4: Supported Microcontrollers

    6. GND: Ground. This line should be connected to the target device’s ground. 1.b. Supported Microcontrollers The Pololu USB AVR programmer should work with all AVRs that can be programmed by an AVR ISP, but it has not been tested on all devices (it has been tested with all...
  • Page 5: Supported Operating Systems

    1.c. Supported Operating Systems The Pololu USB AVR programmer has been tested under Microsoft Windows XP, Windows Vista, Windows 7, and Linux. It is not compatible with any version of the Mac OS or with older versions of Windows. Third-party programming software exists for all operating systems.
  • Page 6: Contacting Pololu

    [http://www.pololu.com/catalog/product/1300] information. We would be delighted to hear from you about any of your projects and about your experience with the Pololu USB AVR Programmer. You can contact us directly [http://www.pololu.com/contact] or post on our forum . Tell us what we did well, [http://forum.pololu.com/]...
  • Page 7: Getting Started In Windows

    Service Pack 3, so we recommend Service Pack 3 over the hotfix. Please note that these drivers will only work for the USB AVR programmer; if you have Pololu’s original Orangutan USB programmer [http://www.pololu.com/catalog/product/740]...
  • Page 8 Pololu USB AVR programmer, in which case no further action from you is required. Windows XP users: After the INF file is installed, follow steps 5-9 for each new Pololu USB AVR programmer you connect to your computer.
  • Page 9 Pololu USB AVR Programmer User's Guide © 2001–2010 Pololu Corporation 8. Windows XP will warn you again that the driver has not been tested by Microsoft and recommend that you stop the installation. Click “Continue Anyway”. 9. When you have finished the “Found New Hardware Wizard”, click “Finish”. After that, another wizard will pop up.
  • Page 10 © 2001–2010 Pololu Corporation usbser.sys. Versions of this driver prior to version 5.1.2600.2930 will not work with the USB AVR programmer. You can check what version of this driver you have by looking in the “Details” tab of the “Properties” window for C:\Windows\System32\drivers\usbser.sys.
  • Page 11: Programming Avrs Using Avr Studio

    If you have an Orangutan or 3pi and want to jump straight in to using your USB AVR programmer, you can skip steps 1-3 by downloading the AVR Studio project these steps would create.
  • Page 12 Pololu USB AVR Programmer User's Guide © 2001–2010 Pololu Corporation Creating a new AVR Studio project, step 1 Select AVR Simulator as the debug platform and then select the appropriate device for your target AVR. For an Orangutan or 3pi Robot, this will either be ATmega48, ATmega168, or ATmega328P depending on which chip your Orangutan or 3pi Robot has.
  • Page 13 LED will still blink. Make sure your USB AVR programmer is connected to your computer via its USB A to mini-B cable and then click the Display the ‘Connect’ Dialog button on the toolbar.
  • Page 14 Pololu USB AVR Programmer User's Guide © 2001–2010 Pololu Corporation AVR Studio’s programmer-selection dialog If the ISP window does not appear when you click “Connect…”, your computer cannot detect the programmer. Please see Troubleshooting (Section 7) for help identifying and fixing the problem.
  • Page 15 “EEPROM” or “ELF Production File Format” sections!). AVR Studio’s Program ISP tab As your USB AVR programmer programs the AVR, you should see all three LEDs flicker and you should see the following text appear at the bottom of the window: Reading FLASH input file..
  • Page 16: Using Advanced Features Of Avr Studio

    It is important to note that the frequencies in the ISP Freq list are correct when you are using the Pololu USB AVR programmer. See Section 3.d for a list of the actual frequencies and more information about selecting the ISP frequency.
  • Page 17: Programming Avrs Using Avrdude

    3.d. Configuring the Programmer The Pololu USB AVR programmer can be configured using the Pololu USB AVR Programmer Configuration Utility for Windows. The utility comes with the Windows drivers (Section 3.a) and can be run by double clicking on the executable pgm03a_config.exe. This section describes all the available settings and what they do.
  • Page 18 Pololu USB AVR programmer configuration utility for Windows. Target VDD Monitor The USB AVR programmer monitors the voltage of the target AVR while it is being programmed to ensure that ISP commands are only sent when the AVR’s VDD is at a safe level, since attempting to program an underpowered AVR can permanently disable it.
  • Page 19 An AVR running at 1 MHz, such as one clocked off of the internal RC oscillator with the divide-by-8 fuse bit programmed, can be programmed at an ISP frequency as high as 200 kHz (57.6 kHz in AVR Studio). This is the USB AVR programmer’s default ISP frequency.
  • Page 20 (or downgrade) your programmer’s firmware; the Pololu AVR USB programmer does not support this method of firmware upgrading, so this dialog is nothing more than a nuisance to those not using an Atmel programmer.
  • Page 21: Getting Started In Linux

    © 2001–2010 Pololu Corporation 4. Getting Started in Linux The Pololu USB AVR programmer can be used in Linux to program AVRs and to send and receive bytes on the USB-to-TTL-serial adapter. The configuration utility is written for Windows; there is no Linux version. All of the...
  • Page 22 Pololu USB AVR Programmer User's Guide © 2001–2010 Pololu Corporation you want to program an AVR that does not have an LED connected to pin PD1, the LED- blinker code in this tutorial will have no visible effect. If your device is an ATmega48, ATmega168, or ATmega328P, download the corresponding archive below: •...
  • Page 23 Pololu USB AVR Programmer User's Guide © 2001–2010 Pololu Corporation avrdude: input file BlinkLED.hex auto detected as Intel Hex avrdude: writing flash (224 bytes): Writing | ################################################## | 100% 0.39s avrdude: 224 bytes of flash written avrdude: verifying flash memory against BlinkLED.hex: avrdude: load data flash data from input file BlinkLED.hex:...
  • Page 24: Communicating Via The Usb-To-Ttl-Serial Adapter

    To determine the port name in Microsoft Windows, open the Device Manager, expand the “Ports (COM & LPT)” list, and look for the “Pololu USB AVR Programmer TTL Serial Port” entry. The port name will be at the end of this line in parentheses (e.g. “COM4”). In Windows, a given device will always be associated with the same port unless you manually change its port assignment (see Section 3.a).
  • Page 25 Pololu USB AVR Programmer User's Guide © 2001–2010 Pololu Corporation In Windows, the Device Manager shows which port name is assigned to the Pololu USB AVR Programmer’s USB-to-TTL-serial adapter. To determine the port name in Linux, type . The port name will be one of ls /dev/ttyACM* the devices listed there.
  • Page 26: Communicating Via The Serial Control Lines

    Pololu USB AVR Programmer User's Guide © 2001–2010 Pololu Corporation You can also write a computer program to use the serial port. The freely available Microsoft .NET framework contains a SerialPort class that makes it easy to read and write bytes from a serial port.
  • Page 27 Pololu USB AVR Programmer User's Guide © 2001–2010 Pololu Corporation Pins A and B can be identified with serial handshaking lines using the Pololu USB AVR Programmer Configuration Utility. After your have associated pins A and/or B with serial handshaking lines, you can take...
  • Page 28 Pololu USB AVR Programmer User's Guide © 2001–2010 Pololu Corporation When the SLO-scope feature is enabled, it assumes control of pins A and B and uses them as analog inputs (or digital outputs controlled by the SLO-scope application). Pins A and B temporarily lose their serial handshaking line associations while the SLO-scope is active, but these associations are restored once the SLO-scope is disabled.
  • Page 29: Measuring Voltages Using The Slo-Scope

    © 2001–2010 Pololu Corporation 6. Measuring Voltages Using the SLO-scope A second bonus feature of the Pololu USB AVR programmer is the severely limited oscilloscope (SLO-scope), which uses lines A and B as inputs to measure TTL-level voltages at a sample rate of up to 20 kHz. The SLO-scope has two operating modes: •...
  • Page 30 Pololu USB AVR Programmer User's Guide © 2001–2010 Pololu Corporation Using the Pololu SLO-scope Application This application connects to the programmer, streams data from the SLO-scope, and provides the basic functionality of a 10 or 20 kHz oscilloscope. Pololu SLO-scope client for Windows.
  • Page 31 Pololu USB AVR Programmer User's Guide © 2001–2010 Pololu Corporation side of the lower pane to the desired position. When triggering is enabled, the data in the lower pane will update whenever a trigger event occurs. Triggering can help you to better identify and analyze periodic signals (such as motor noise, PWMs, etc.) while the SLO-scope...
  • Page 32: Troubleshooting

    © 2001–2010 Pololu Corporation 7. Troubleshooting This section helps solve problems you might have using the Pololu USB AVR programmer. If the computer fails to connect to the programmer: • Make sure your programmer is connected to your computer via a USB A to mini-B cable.
  • Page 33 There could also be a short or cut trace somewhere on your target device. The ideal way to test for this is to try programming a different device with your USB AVR programmer, or try using a different programmer to program your target device. If this is not an option, try verifying that the target device is still functional and perform some continuity tests to check for shorts or disconnections on the ISP programming lines.
  • Page 34 Pololu USB AVR Programmer User's Guide © 2001–2010 Pololu Corporation Still need help? contact none above troubleshooting suggestions help, please for support. [http://www.pololu.com/contact] 7. Troubleshooting Page 34 of 36...
  • Page 35: Upgrading Firmware

    © 2001–2010 Pololu Corporation 8. Upgrading Firmware The program that runs on the USB AVR Programmer (the firmware) can be upgraded with bug fixes or new features. Version 1.01 (revision code 0101) of the firmware fixes two bugs with the TTL serial port (the RX and TX lines).
  • Page 36 Pololu USB AVR Programmer User's Guide © 2001–2010 Pololu Corporation 2. Download the latest version of the firmware here: ◦ Firmware version 1.01 Programmer (34k [http://www.pololu.com/file/download/pgm03a_v1.01.pgm?file_id=0J316] pgm)—released December 17th, 2009. 3. Get your programmer in to bootloader mode. In Windows, this can be done by clicking the “Start Bootloader”...

Table of Contents