Atmel AVR ICE 200 User manual

ICE 200
.............................................................................
User Guide


AVR ICE 200 User Guide i
Table of Contents
Section 1
Preface – Read this First......................................................................1-1
1.1 About this Manual .....................................................................................1-1
1.2 Helpful Information....................................................................................1-1
1.3 Tips ...........................................................................................................1-1
1.4 Checklists..................................................................................................1-1
1.5 Related Documentation ............................................................................1-1
Section 2
Introduction...........................................................................................2-1
2.1 ICE 200 Features......................................................................................2-2
2.2 ICE 200 Contents......................................................................................2-2
2.3 System Requirements...............................................................................2-3
2.3.1 Hardware Requirements.....................................................................2-3
2.3.2 Software Requirements......................................................................2-3
2.3.3 Operating Conditions..........................................................................2-3
2.3.4 Host Interface.....................................................................................2-3
Section 3
General Description..............................................................................3-1
Section 4
Using the ICE 200.................................................................................4-1
4.1 Target Hardware Requirements................................................................4-1
4.2 Power and Signal Operating Conditions...................................................4-1
4.3 Clock Driver Requirements.......................................................................4-2
4.4 Personality Adapters.................................................................................4-3
4.5 Special Tiny12 Personality Adapter Settings............................................4-6
4.6 Connecting to the Target Application........................................................4-7
4.6.1 Checklist.............................................................................................4-9
4.7 Configuration...........................................................................................4-10
4.8 Quick Start ..............................................................................................4-10
4.8.1 Checklist...........................................................................................4-11

Table of Contents
ii AVR ICE 200 User Guide
4.9 Emulator Options Settings......................................................................4-11
4.9.1 Device Settings.................................................................................4-11
4.9.2 Clock Selection Settings...................................................................4-11
4.9.3 Single-step Timers Setting ...............................................................4-11
4.9.4 EEPROM Restore Setting................................................................4-12
4.9.5 Communication Speed Setting.........................................................4-12
4.9.6 Reset Pin Setting (ATtiny12 only).....................................................4-12
Section 5
Special Considerations.........................................................................5-1
5.1 External RESET........................................................................................5-1
5.2 SLEEP Instruction.....................................................................................5-2
5.3 Watchdog Timer (WDT)............................................................................5-2
5.4 EEPROM ..................................................................................................5-3
5.5 I/O Port Access.........................................................................................5-3
5.6 16-bit I/O Access (Timer 1 and A/D Converter) ........................................5-4
5.7 UART Data Register .................................................................................5-4
Section 6
Appendix...............................................................................................6-1
6.1 Emulating AT90S1200 and ATtiny10/11...................................................6-1
6.1.1 Using the Include Files.......................................................................6-1
6.1.2 Using the ATtiny12 Adapter for Emulating the ATtiny10/11...............6-2
6.1.3 Using the AT90S2313 Adapter for Emulating the AT90S1200...........6-2
6.2 AVR Emulator Chip Errata........................................................................6-2
6.3 Troubleshooting ........................................................................................6-3
6.3.1 Feedback and Support.......................................................................6-3
6.4 Contact Information...................................................................................6-3

AVR ICE 200 User Guide 1-1
Section 1
Preface – Read this First
1.1 About this
Manual This user guide serves as a reference manual for the Atmel AVR®ICE 200™in-circuit
emulator. The AVR ICE 200 User Guide is an easy introduction on how to use the ICE
200, and a detailed reference for advanced users. Throughout the manual, many refer-
ences to the AVR microcontrollers are made in short form, i.e. AT90S2313 is referred to
as S2313 and so on.
The user should install the latest version of the AVR Studio available on the Atmel
web site.
1.2 Helpful
Information This manual contains helpful information to improve the reliability, performance, and
longevity of the ICE 200 and the target system.
NOTICE
!
This is a Notice...
Please follow the instructions in a NOTICE carefully.
1.3 Tips Some sections contain useful tips for using the ICE 200. All the tips are emphasized as
shown in the example below.
©Tip! This is a tip!
1.4 Checklists When the detailed descriptions in the
Connecting to the Target Application
and in the
Configuration
sections have been used and you are beginning to feel comfortable with
the use of the ICE 200, you can use the checklists at the end of these sections for fast
setup of a new project. The checklists are of great help for getting the debugging system
online without problems. However, novice users should also check that the operating
conditions of the target system are compliant to the requirements of ICE 200. This is
described in the
Using the ICE 200
section.
1.5 Related
Documentation The Atmel CD-ROM contains various documentation relating to the use of AVR micro-
controllers and of the debugging tools including AVR Studio User Guide, AVR
Assembler User Guide and complete microcontroller datasheets.
Rev. 1413A-06/23/99

Preface – Read this First
1-2 AVR ICE 200 User Guide

AVR ICE 200 User Guide 2-1
Section 2
Introduction
The ICE 200 in-circuit emulator provides an easy way of debugging embedded systems
that utilizes the Atmel AVR microcontroller. It emulates 11 different devices of the AVR
and the Tiny AVR families.
The philosophy of the ICE 200 is to provide an easy-to-use debugging platform, with a
minimum of differences between the emulator and the actual processor it is emulating.
The AVR emulator chip used by the ICE 200, is produced in the same process technol-
ogy as the microcontroller it is emulating. This provides identical electrical
characteristics. On-board debugging resources ensure non-intrusive software emula-
tion. The ICE 200 hardware also includes an automatic configuration system that makes
the process of connecting the target to the emulator an easy task.
Figure 2-1.
The ICE 200 Components
When used with the AVR Studio debugging environment, the ICE 200 gives the user full
run time control, unlimited number of breakpoints, symbolic debugging and full memory
and register visibility. Multiple ICE 200 emulators can be used by AVR Studio at the
same time, only limited by the number of serial ports available, giving a high degree of
flexibility.

Introduction
2-2 AVR ICE 200 User Guide
2.1 ICE 200 Features ■Devices Supported
ATtiny12, AT90S2313, AT90S2333/4433, AT90S4414/8515, AT90S4434/8535,
ATtiny10/11 (using ATtiny12 adapter), AT90S1200 (using AT90S2313 adapter)
■Supports 8 MHz (+4.0V to +6.0V) AVR Emulator Chip (varies between devices
being emulated)
■Wide Target Voltage Range (+2.7V to +5.5V)
■Emulator Chip Provides Excellent AC Characteristics
■Non-intrusive
■Target Voltage Sensing Ensures Secure Operation
■Personality Adapter for Each of the Supported Processors
■32-bits Cycle Counter
■I/O Continues to Operate in Halt State After a Break or Breakpoint
■Single-stepping or Continuous Timer Operation while Single-stepping Code. Utilizes
the AVR Studio Debugging Environment that adds: Full Run Time Control: run, break,
trace into, step over, step out, run-to-cursor, reset, autostep and multistep
■Unlimited Number of Breakpoints
■Symbolic Debugging Support
■Full Visibility of and Access to register File, SP, PC and Memories
■Access to all I/O Registers – See Section 5: Special Considerations
■Auto Log Points – Non-real Time Logging/Watches
2.2 ICE 200 Contents The ICE 200 contains the following items:
■ICE 200 Main Board, pod and two Flexible Printed Circuit Cables
■Personality Adapters for:
ATtiny12 (8-pin DIP)
AT90S2313 (20-pin DIP)
AT90S2333/4433 (28-pin DIP)
AT90S4414/8515 (40-pin DIP)
AT90S4434/8535 (40-pin DIP)
■9-pin RS232C Cable
■Atmel CD ROM containing:
AVR data books
Application notes
AVR Studio
AVR Assembler
■ICE 200 User Guide (this document)
■Power Cable
■Diagnostic Adapter for Test Purposes

Introduction
AVR ICE 200 User Guide 2-3
2.3 System
Requirements
2.3.1 Hardware
Requirements Pentium-class personal computer with the following specifications is recommended:
■16M Byte RAM, or more
■3M Byte of free hard disk space
■CD-ROM or Internet access (for software and data books)
■VGA monitor, or better
■16650 Compatible Serial Port (COM port)
2.3.2 Software
Requirements The following operating systems are currently supported by AVR Studio:
■AVR Studio v2.00 or later installed. See the Atmel web site (www.atmel.com) for
latest version.
■Microsoft Windows NT 3.51
■Microsoft Windows NT 4.0
■Microsoft Windows 95
■Microsoft Windows 98
Note:
AVR Studio will be updated to execute new versions of these operating
systems. See AVR Studio User Guide for latest information.
2.3.3 Operating
Conditions ■Operation Temperature: 0°C - 70°C
■Operating Humidity: 10 - 90% RH (non-condensing)
■Supply Voltage: +9.0V to +12.0V DC or 9.0V AC
■Supply Current: 400 mA
NOTICE!
Violating the recommended operating conditions for the ICE 200 might
cause incorrect operation and damage the emulator.
2.3.4 Host Interface RS-232C @ 19200 bps, 1 start-, 8 data- and 1 stop-bit, no parity. 9-pin female
connector.

Introduction
2-4 AVR ICE 200 User Guide

AVR ICE 200 User Guide 3-1
Section 3
General Description
Figure 3-1 shows a simplified block diagram of the ICE 200 connected to a target board
(the application). Power supplies and a host PC are also shown.
Figure 3-1.
ICE 200 – Simplified Block Diagram
Power
Supply
Host PC
Main Board (5.0V)
Program Memory
Control and
Communication
Logic
Level Converters
POD
(AT90EM04)
Personality
Adapter
Target MCU
Socket
Target Clock
(or XTAL or
Resonator)
Target Board (2.7 - 5.5V)
Power
Supply
FPC

General Description
3-2 AVR ICE 200 User Guide
The main board (Figure 3-2) contains the program memory (overlay memory) which
holds the application code that is being emulated. The main board also contains logic for
communicating with the host PC, and the breakpoint logic. The level converters allow
the target to operate at a different supply voltage from that of the emulator. The level
converters also protect the emulator and the target from being damaged if only one of
them is powered. Due to this feature, a strict power-up sequence is not required.
Figure 3-2.
ICE 200 – Main Board

General Description
AVR ICE 200 User Guide 3-3
The FPC or Flexible Printed Cable (Figure 3-3) connects the main board to the ICE 200
Pod. The actual appearance of the FPC may differ from the figure.
Figure 3-3.
ICE 200 – FPC
NOTICE!
The Flexible Printed Cable must not be folded.
NOTICE!
Do not disassemble the Flexible Printed Cable from the pod or ICE 200
main board.

General Description
3-4 AVR ICE 200 User Guide
The pod (Figure 3-4) contains the AVR emulator chip. Note that the AVR emulator chip
must be supplied with power and a clock source, i.e. a crystal, resonator, oscillator or
any other clock generator, from the target.
Figure 3-4.
The ICE 200 Pod

General Description
AVR ICE 200 User Guide 3-5
The personality adapters (Figure 3-5) map the pinout from ICE 200 Pod to each
microcontroller it supports. The adapters include an identification code that AVR Studio
uses for automatic device type detection. The ICE 200 kit contains five different
personality adapters for dual-in-line package devices.
Figure 3-5.
The ICE 200 – Personality Adapter for the AT90S8535 – ATadap3100

General Description
3-6 AVR ICE 200 User Guide

AVR ICE 200 User Guide 4-1
Section 4
Using the ICE 200
Before opening the ESD protection bag, take precaution to eliminate electrostatic dis-
charge. Always use ESD protected tools and clothing when using the ICE 200.
Grounded wrist-band and static-dissipative work surface provides the most efficient
ESD protection. The ICE 200 should be handled with the same care as any CMOS
component.
NOTICE!
ESD (Electrostatic Discharge) SENSITIVE DEVICE. Do not use the ICE 200
outside an ESD protected environment.
A discharge may result in permanent damage or performance degradation.
4.1 Target Hardware
Requirements The target application hardware must include both power supply and a clock source.
The ICE 200 can not function unless these conditions are met. Note that the emulator
also supports the internal RC-oscillator option to the Tiny12 device.
©Tip!
You can use an AVR development board (ATMCU00100 or ATSTK200) for
using the ICE 200 as a standalone emulator platform.
Please follow the recommended operating conditions listed in the next two sections.
These conditions also apply for the standard AVR microcontrollers.
4.2 Power and
Signal Operating
Conditions
Note:
When VCC < 2.4V, the AVR emulator chip is reset and the program
memory disconnected.
The ICE 200 does not support +12V RESET pin voltage that is used
for parallel programming.
Table 4-1.
Recommended Operating Conditions, Power and Signals (TA= 0°C to 70°C,
VCC = +2.7V to +5.5V, GND = 0V)
Symbol Min Max
VCC 2.7V 5.5V
AVCC VCC VCC ± 0.3V
AGND GND GND
AREF AGND AVCC
VSI (Signal Input Voltage) -0.5V VCC + 0.5V
VRESET (RESET pin input Voltage) GND VCC

Using the ICE 200
4-2 AVR ICE 200 User Guide
4.3 Clock Driver
Requirements AVR microcontrollers are fully static designs. The processor clock can be stopped exter-
nally. The AVR emulator chip needs a clock to communicate with the main board.
Without a clock source, the host PC gets a serial communication time-out when reading
status or variables from the emulator. Please refer to the datasheet for information about
clock oscillator options.
NOTICE!
Using the ICE 200 outside the recommended operating conditions will
cause incorrect operation and can damage the emulator.
Table 4-2.
Recommended Operating Conditions, Clock Drive (+4.0V to +5.5V)
(TA=0
°C to 70°C, VCC = +4.0V to +5.5V, GND = 0V)
Symbol Min Max
fosc (ATtiny12) 32.768 kHz 8 MHz
fosc (AT90S2313) 32.768 kHz 10 MHz
fosc (AT90S4433/2333) 32.768 kHz 10 MHZ
fosc (AT90S8515/4414) 32.768 kHz 8 MHz
fosc (AT90S8535/4434) 32.768 kHz 8 MHz
Table 4-3.
Recommended Operating Conditions, Clock Drive (Low-voltage +2.7V to
+4.0V) (TA= 0°C to 70°C, VCC = +2.7V to +4.0V, GND = 0V)
Symbol Min Max
fosc (ATtiny12/) 32.768 kHz 4 MHz
fosc (AT90S2313) 32.768 kHz 4 MHz
fosc (AT90S4433/2333) 32.768 kHz 4 MHz
fosc (AT90S8515/4414) 32.768 kHz 4 MHz
fosc (AT90S8535/4434) 32.768 kHz 4 MHz

Using the ICE 200
AVR ICE 200 User Guide 4-3
4.4 Personality
Adapters The ICE 200 is supplied with five different personality adapters. Each adapter makes the
pinout mapping for one or more AVR microcontrollers.
©Tip!
Mounting a DIP socket on the personality adapter reduces the risk of breaking
pins on the adapter, thus extending adapter lifetime.
©Tip!
You can mount additional DIP sockets to the adapter to increase the space
between the adapter and the target. However, the number of extra sockets
should be kept at a minimum.
If you are utilizing surface mount device (SMD) versions of the supported AVR micro-
controllers, you need to obtain an SMD adapter that converts from DIP to the
appropriate socket.
Figure 4-1.
Personality Adapter for ATtiny12 – ATadap3400

Using the ICE 200
4-4 AVR ICE 200 User Guide
Figure 4-2.
Personality Adapter for AT90S2313 – ATadap3300
Figure 4-3.
Personality Adapter for AT90S4433/2333 – ATadap3200
Table of contents
Other Atmel Adapter manuals