ispRE: Do-it-yourself AVRISP-compatible Programmer

Umschalten auf die deutsche Fassung dieser Seite.

Evertool! I have developed a programming- and debugging-hardware which is more interesting (at least for me). See the Evertool page for more information.

Intro

The ATMEL AVRISP In-System Programmer is a small device to program ATMEL AVR microcontrollers. The original device is described here This is a rebuild of this device with minimal hardware. The main advantage of such a programmer is the compatibility with the ATMEL AVRstudio. So the frontend-software (AVRstudio) and programmer firmware are supported by the makers of the target-controllers. With the AVRstudio AVRISP/STK500-plug-in programming of flash, eeprom, fuse- and lockbits is an easy task.

Before you start you may concider this:

Changelog

Hardware

Schematic


enlarge (2400*1600 png-Graphics)

Main components:

Development-Board

List of parts

PartPiecesFunction
ATMega8535(L)1Programming Controller, L-type for reliable programming of 3V targets
DIL40 Socket1for ATmega8535
MAX32321RS232 level shifter and inverter, 3V-type for reliable programming of 3V targets
DIL14 Socket1for MAX(3)232
3,6864MHz Quarz1
ATtiny23131internal update controller
DIL20 Socket1for ATtiny2313
1uF Electrolyt-Capacitor44 for MAX(3)232 charge pumps
22uF Electrolyt-Capacitor1stabilisation near ISP-connector
100nF Capacitor5"block capacitors" 4 for AVRs, 1 for MAX(3)232
22pF Capacitor 2 near Quarz-Oscillator
100nF Cap. 2 Filter at AVR Reset
10kOhm Resistor 2 AVR Reset Pull-Ups
LED low-current (2mA) 2 Indicator LEDs
1.5kOhm Resistor 2 LED current limiter
DSUB connector "female" 1 PC RS232 connection
Pin-Header 2*5 1 ISP connection "Kanda-Standard" (see schematic)
Pin-Header 2*3 1 ISP connection "Atmel-Standard" (see schematic)
Pin-Header 2*3 1 ISP Resetline selector (see schematic)
Pin-Header 1*3 1 Update-enable Jumper
Pin-Header 1*1 1 Rescue-Clock connection (ca. 0,7 MHz)
Jumper 2 for reset-selector and update-enable
Pin-Header 1*2 1 external power supply for internal programming with STK200-PPI (stable DC)
Prototype-Board 2,54 mm grid 1

Software

The ATtiny2313-software is available for different AVR-targets. If you have an AVR-board and would like to add ISP functions (via UART or USB) without using a bootloader: contact me by e-mail.

(A Version of the update-firmware for the old AT90S2313 (timestamp 20060205). I have not tested this version myself but got positive reports from users.)

Step-by-Step Guide

Initial setup

Has to be done only once with new AVRs on the ispRE-board.
  1. Build the board and double-check
  2. Make sure the Update-Enable Jumper is open
  3. Set the Reset-Select Jumper to "ISP mega8535"
  4. connect external power supply if STK200-ppi is used (5V)
  5. Set the ATmega8535-fuses: External high-freq-Crystal, CKOPT enabled ("programmed"), AT908535 compatibility. For avrdude-users: lfuse = 0xff, hfuse = 0x49, locks = 0xff
  6. power down (turn off power supply)
  7. Set the Reset-Select Jumper to "ISP tiny2313"
  8. connect external power supply if STK200-ppi is used (5V)
  9. Set the ATtiny2313-fuses. External Clock (everything else disabled: devided, brownout etc.). For avrdude-users: lfuse = 0xe0, hfuse = 0xdf, efuse = 0xff, locks = 0xff
  10. Upload the ispRE update-firmware into the ATtiny2313's flash-memory using PonyProg or avrdude
  11. power down
  12. Set the Reset-Line-Selector to "normal/AVRISP-mode"

Programming-Firmware Update

Has to be done to update the ATmega8535 firmware with a new board or when Atmel delivers new firmware with AVRStudio.
  1. power down
  2. disconnect all targets from the ISP connectors
  3. connect PC to the ispRE-board with serial/RS232 cable (or USB if FT232 or functional compatible device has been used)
  4. close the Update-Enable Jumper
  5. Supply power to the board
  6. start AVRstudio->tools->avrprog
  7. upload (write) the file STK500.ebn from the AVRTools/stk500-directory (set filter to *.* in file dialog). The ATtiny2313 will receive the firmware-code and transfer it to the ATmega8535
  8. power down
  9. open the Update-Enable Jumper

Operation

ispRE is fully compatible with the Atmel AVRISP (STK500 in low-voltage serial-programm/serial download). Connect a target-board to the ispRE board, make sure this target-board supplies power to the ISP connector or use an external power-supply. Connect PC to the programmer via RS232 (or USB if you have used a FT232 chip). Start AVRstudio->Tools->AVRISP/STK500 (Tools/connect in newer versions of AVRStudio). You should see the AVR-Studio AVRISP/STK500 plugin. Refer to the AVR-Studio online help for further information. The ispRE can also be used with avrdude (programmer stk500 or stk500v2 for stk500.ebn from AVRStudio >=4.11).

A 0,7MHz clock signal ist available at the RescueClock pin near the ATtiny2313. Can be used to clock target AVRs where the fuse bits do not match the hardware (i.e. when the target is programmed for external clock but should be programmed for external XTAL). Make sure to use an ISP-Frequency <0.7MHz/4 when accessing targets clocked by the rescue clock.


back to my AVR projects page


Martin Thomas


99521 hits since March 17, 2005
Last mod.: Wednesday, 29-Aug-2007 03:22:17 CEST