![Atmel AVR ICE 200 User Manual Download Page 33](http://html.mh-extra.com/html/atmel/avr-ice-200/avr-ice-200_user-manual_3003112033.webp)
AVR ICE 200 User Guide
6-1
Section 6
Appendix
6.1
Emulating
AT90S1200 and
ATtiny10/11
6.1.1
Using the Include
Files
Always use include files for the I/O registers addresses and for bit definitions in your
source code files. This will ease the process of porting code from one microcontroller to
another. The files can be found on the CD-ROM which is included in the ICE 200 kit.
Copy the include file to your project directory, and include it in the top of the program
code as shown below:
(AVR Assembler example)
.include "1200def.inc"
Then, when writing a value to a I/O register, use the following notation:
(AVR Assembler example)
ldi
r16, (1<<DDD1) + (1<<DDD4)
; Set port D pin 1 and 4 as output and
; the rest as input.
out
DDRD, r16
Note the use of the bit definitions. DDD1 and DDD4 are pin definitions in form of bit
position, and therefore they must be shifted this number of bits to the left to make a
correct mask.
Interrupt vector locations might differ from part-to-part. This is easily handled by using
the vector definitions found in the include files.
(AVR Assembler example)
.include "1200def.inc"
.org
0
rjmp
RESET_Handler
.org
INT0addr
rjmp
INT0_Handler
.org
OVF0addr
rjmp
OVF0_Handler
.org
ACIaddr
rjmp
ACI_Handler
... ( program code starts here )
Summary of Contents for AVR ICE 200
Page 1: ...ICE 200 User Guide ...
Page 2: ......
Page 6: ...Preface Read this First 1 2 AVR ICE 200 User Guide ...
Page 10: ...Introduction 2 4 AVR ICE 200 User Guide ...
Page 16: ...General Description 3 6 AVR ICE 200 User Guide ...
Page 36: ...Appendix 6 4 AVR ICE 200 User Guide ...
Page 37: ...Appendix AVR ICE 200 User Guide 6 5 ...
Page 38: ...Appendix 6 6 AVR ICE 200 User Guide ...
Page 39: ......