Atmel AVR910 Manual
Atmel AVR910 Manual

Atmel AVR910 Manual

In-system programming
Hide thumbs Also See for AVR910:

Advertisement

AVR910: In-System Programming
Features
Complete In-System Programming
Solution for AVR Microcontrollers
Covers All AVR Microcontrollers with
In-System Programming Support
Reprogram Both Data Flash and
Parameter EEPROM Memories
Complete Schematics for Low-cost
In-System Programmer
Simple 3-wire SPI Programming
Interface
Introduction
In-System programming allows program-
ming and reprogramming of any AVR
microcontroller positioned inside the end
system. Using a simple 3-wire SPI inter-
f a c e , t h e I n - S y s t e m p r o g r a m m e r
communicates serially with the AVR
microcontroller, reprogramming all non-
volatile memories on the chip.
In-System programming eliminates the
physical removal of chips from the sys-
tem. This will save time, and money,
both during development in the lab, and
when updating the software or parame-
ters in the field.
This application note shows how to
design the system to support In-System
programming. It also shows how a low-
cost In-System programmer can be
made, that will allow the target AVR
microcontroller to be programmed from
any PC equipped with a regular 9-pin
Figure 1. 6-wire Connection between Programmer and Target System
PC 9-PIN
SERIAL PORT
TXD
RXD
GND
serial port. Alternatively, the entire In-
System programmer can be built into the
system allowing it to reprogram itself.
The Programming
Interface
For In-System programming, the pro-
grammer is connected to the target using
as few wires as possible. To program
any AVR microcontroller in any target
system, a simple 6-wire interface is used
to connect the programmer to the target
PCB. Figure 1 below shows the connec-
tions needed.
The Serial Peripheral Interface (SPI)
consists of three wires: Serial ClocK
(SCK), Master In – Slave Out (MISO)
and Master Out – Slave In (MOSI).
When programming the AVR, the In-
System programmer always operate as
the mas ter, and the target s ys te m
always operate as the slave.
The In-System programmer (master)
provides the clock for the communication
on the SCK line. Each pulse on the SCK
line transfers one bit from the program-
mer (master) to the target (slave) on the
Master Out – Slave In (MOSI) line.
Simultaneously, each pulse on the SCK
line transfers one bit from the target
(slave) to the programmer (master) on
the Master In – Slave Out (MISO) line.
IN-SYSTEM
PROGRAMMER
VCC
RES
TXD
MISO
RXD
MOSI
GND
SCK
TARGET AVR MCU
AT90S
XXXX
VCC
RESET
MISO
MOSI
SCK
GND
8-bit
RISC
Microcontroller
Application
Note
Rev. 0943C–11/00
1

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Summary of Contents for Atmel AVR910

  • Page 1 AVR910: In-System Programming 8-bit Features serial port. Alternatively, the entire In- System programmer can be built into the • Complete In-System Programming RISC system allowing it to reprogram itself. Solution for AVR Microcontrollers • Covers All AVR Microcontrollers with Microcontroller...
  • Page 2: Hardware Design Considerations

    Target Power To allow simple programming of targets operating at any voltage, the In-System programmer can draw power from the target. Alternatively, the target can have power supplied through the In-System programming connector for the duration of the programming cycle AVR910...
  • Page 3 AVR910 Figure 3. Connecting ISP Programming Cable to Target MOSI SPI Bus. When programming the AVR in Serial mode, the In-System programmer supplies data to the target on the MOSI pin. This pin is always driven by the programmer, and the target...
  • Page 4: Command Format

    For details on available instructions, please refer to the check if the command has been accepted by the target Serial Programming section of the datasheet. AVR microcontroller, the Device Code could be read. The Device Code is also known as the signature bytes. AVR910...
  • Page 5: Device Code

    Part Family and Flash Size $9n indicates AVR with 2 kB Flash memory Part Number Identifies the part, see the file avr910.asm for a complete listing of supported devices Table 5. Part Number Identification Examples Part Family and Flash Size...
  • Page 6 MISO, Returned from Target AVR Write $12 at address $10C, low byte $60 01 0C 12 $zz 60 01 0C Wait N ms Write $0F at address $10C, high byte $68 01 0C 0F $xx 68 01 0C Wait N ms AVR910...
  • Page 7 AVR910 EEPROM DATA MEMORY ACCESS The lock bits will only prevent the programming interface from altering memory contents. The core can read the Using the “Read EEPROM Data Memory” command, Flash program memory and access the EEPROM as usual, EEPROM contents can be read one byte at a time. The independent of the lock bit setting.
  • Page 8 System programmer. Instead, it will show how a simple is not a problem with the majority of existing PCs. low-cost pr ogrammer can be made, using only an The file avr910.asm contains the firmware for the AT90S1200 and a few discrete components. AT90S1200.
  • Page 9: Part List

    AVR910 Part List Position Value Device Tolerance Vendor Comment C100 1U0/20V CE1U020V PHILIPS +++ TANTAL CAPACITOR, SMD, (EIA3216) C101 100N/50V C08B100N 10%_X7R MURATA +++ CERAMIC CAPACITOR, 0805, D100,D101 75V/100MA BAS16 PHILIPS +++ SWITCH DIODE, SO-23 PACKAGE J100 9 PIN DSUB-9FSOL...
  • Page 10 No licenses to patents or other intellectual prop- erty of Atmel are granted by the Company in connection with the sale of Atmel products, expressly or by implication. Atmel’s products are not authorized for use as critical components in life suppor t devices or systems.

Table of Contents