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:
- The original device is cheap (prices May 2004: ca. 40 EUR incl. Tax at www.reichelt.de,
ca. 26 EUR+TAX at de.digi-key.com). The home-made programmer may not be worth the effort.
I've made the board as a first step to Evertool and later updates because the ATtiny-Code has already been developed
for another project and could be adapted easily.
- The presented device only has minimum hardware (no ESD-protection IC etc). Refer to
the schematic of the original ATMEL device.
- You need a programmer to build this programmer. A simple STK200-dongle will do. Refer the
lancos.com PonyProg page. The programmer is only used for the first programming. Update to the latest STK500/AVRISP firmeware is
done by the internal programmer on the ATtiny2313.
- Tobi presents a "Do-It-Yourself" high and low-voltage programmer
on his page. Additionaly to the programmer presented here which offers
low-volatage-serial-programming ("serial downloading") Tobi's device
can also program AVR-controllers in high-voltage serial-programming
mode (and parallel-programming mode) like Atmel's STK500.
Changelog
- 19. Apr. 2005 - Pull-Up PD4 to PD6 (found by Björn B.); untested AT90S2313-version of the "updater"-firmware
- 06. Feb. 2006 - small change in *2313 firmware -> V0.2
Hardware
Schematic
enlarge (2400*1600 png-Graphics)
Main components:
- ATmega8535 (L-type prefered). The update-firmware on the ATtiny2313 is compatible with the ATmega8535, an AT90S8535 may be
used but has not been tested
- ATtiny2313 for internal update
- MAX(3)232 (3V version prefered)
- 2*5 pin-header
- SUBD-9 Socket
Development-Board
List of parts
Part | Pieces | Function |
ATMega8535(L) | 1 | Programming Controller, L-type for reliable programming of 3V targets |
DIL40 Socket | 1 | for ATmega8535 |
MAX3232 | 1 | RS232 level shifter and inverter, 3V-type for reliable programming of 3V targets |
DIL14 Socket | 1 | for MAX(3)232 |
3,6864MHz Quarz | 1 | |
ATtiny2313 | 1 | internal update controller |
DIL20 Socket | 1 | for ATtiny2313 |
1uF Electrolyt-Capacitor | 4 | 4 for MAX(3)232 charge pumps |
22uF Electrolyt-Capacitor | 1 | stabilisation near ISP-connector |
100nF Capacitor | 5 | "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
- For the initial programming: avrdude or ponyprog (or any other programmer compatible with the available programming-hardware)
- AVRStudio 4
- ATtiny2313 update-firmware. Available as binary (intel-hex) here (timestamp 20060205).
Only free for non-commercial use!. Contact me by e-mail if you need a commercial-license.
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.
- Build the board and double-check
- Make sure the Update-Enable Jumper is open
- Set the Reset-Select Jumper to "ISP mega8535"
- connect external power supply if STK200-ppi is used (5V)
- Set the ATmega8535-fuses: External high-freq-Crystal, CKOPT enabled ("programmed"), AT908535 compatibility.
For avrdude-users: lfuse = 0xff, hfuse = 0x49, locks = 0xff
- power down (turn off power supply)
- Set the Reset-Select Jumper to "ISP tiny2313"
- connect external power supply if STK200-ppi is used (5V)
- Set the ATtiny2313-fuses. External Clock (everything else disabled: devided, brownout etc.).
For avrdude-users: lfuse = 0xe0, hfuse = 0xdf, efuse = 0xff, locks = 0xff
- Upload the ispRE update-firmware into the ATtiny2313's flash-memory using PonyProg or avrdude
- power down
- 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.
- power down
- disconnect all targets from the ISP connectors
- connect PC to the ispRE-board with serial/RS232 cable (or USB if FT232 or functional compatible device has been used)
- close the Update-Enable Jumper
- Supply power to the board
- start AVRstudio->tools->avrprog
- 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
- power down
- 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
43401 hits since March 17, 2005
Last mod.: Wednesday, 29-Aug-2007 03:22:17 CEST