(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, r16Note the use 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 )Using the ATtiny12 Adapter for Emulating the ATtiny10/11
Using the AT90S2313 Adapter for Emulating the AT90S1200
The AT90S1200 can be defined as a subset of AT90S2313. They have the
same pinout, but AT90S1200 does not have the following features :
IMPORTANT!
Since the AT90S2313 uses a stack pointer, this has to be initialized.
The simplest way is include the following lines at the top of the program
code :
( AVR Assembler example )
ldi r16, 0xDF ; Set the stack pointer to point at the highest SRAM address out 0x3D, r16Note that this gives more than 3 levels of stack. This means that programs working in emulator using the AT90S2313 might not work in a real AT90S1200 device. Always check that the number of stack locations used does not exceed 6 bytes (equals 3 levels).
The AT90S2313 has no RC oscillator, so this feature found on the AT90S1200
can not be supported.
Use the AT90S2313 include file when emulating AT90S1200 to get the interrupts
placed on the right locations.
See Also