XMEGA256A3BU mit USB

  • 1
  • 2
  • Page 1 of 2
wom
 
Avatar
 
Subject:

XMEGA256A3BU mit USB

 · 
Posted: 06.12.2016 - 11:27  ·  #1
Hallo zusammen,

hat jemand schon die USB Schnittstelle am xmega256a3bu mit E-Lab zum laufen bekommen. Bei mir kommt immer die Meldung :

unknown int : TRNCOMPL und BUSEVENT

Gruß wom

INIT Block
_____________________
program MINI3_X1;
{$NOWATCHDOGAUTO}
{$NOSHADOW}
{$WG}

Device = xmega256A3BU, VCC=3.3;
{ $BOOTRST $20000} {Reset Jump to $20000}

Define_Fuses
Override_Fuses;
NoteBook = D;
COMport = USB;
LockBits0 = [];
FuseBits0 = [];
FuseBits1 = [];
FuseBits2 = [];
FuseBits5 = [BODACT0, BodLevel0, BodLevel1, BodLevel2];
-----------------
pvs-deck
PowerUser
Avatar
Gender:
Age: 53
Homepage: pvs-deck.de
Posts: 1341
Registered: 02 / 2009
Subject:

Re: XMEGA256A3BU mit USB

 · 
Posted: 06.12.2016 - 15:26  ·  #2
Quote by wom

hat jemand schon die USB Schnittstelle am xmega256a3bu mit E-Lab zum laufen bekommen. Bei mir kommt immer die Meldung :
----


Hallo wom,

ich nutze den xmega256A3U mit USB schon seit längerer Zeit ohne Probleme.

Gruß
Thorsten
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: XMEGA256A3BU mit USB

 · 
Posted: 06.12.2016 - 17:08  ·  #3
Hallo wom,

sorry, im diesem DSC File XMega256A3BU fehlen die USB Interrupt vektoren.
Code
; $00FA USB_INT_base on port D
vectnr125=BUSEVENT
vectnr126=TRNCOMPL

[peripheral]

Bitte einfügen.

rolf
wom
 
Avatar
 
Subject:

Re: XMEGA256A3BU mit USB

 · 
Posted: 07.12.2016 - 14:31  ·  #4
Hallo Rolf,

hat anscheinend nichts gebracht oder ich hab da einen Fehler gemacht.

Gruß
WOM

Code
[linereset]
program MINI3_X1;
{$NOWATCHDOGAUTO}
{$NOSHADOW}
{$WG}

Device = xmega256A3BU, VCC=3.3;
{ $BOOTRST $20000}         {Reset Jump to $20000}

Define_Fuses
  Override_Fuses;
  NoteBook                = D;
  COMport                 = USB;
  LockBits0               = [];
  FuseBits0               = [];
  FuseBits1               = [];
  FuseBits2               = [];
  FuseBits5               = [BODACT0, BodLevel0, BodLevel1, BodLevel2];

Import SysTick,WatchDog, SerPortC0, SerPortC1, SerPortE0, SerPortF0, I2Cport;
Import RTclock, UserPort, TWI_E, TickTimer, ADC_A;
Import BeepPort, SerPortCDC;

From System Import Float,LongWord;

Define
      // XMega USB must use the internal 32MHz OSC. So the system must use the 2MHz OSC
      OSCtype                 = int2MHz,
      PLLmul                  = 16,
      prescB                  = 1,
      prescC                  = 1;
      SysTick                 = 10, User;                 // msec
      StackSize               = $0128, iData;
      FrameSize               = $0128, iData;
      WatchDog    = msec2000;                       {2048msec}

  USBmanufact             = 'AVRco Pascal';              // max 31 bytes
  USBprodName             = 'Serial CDC-USB';            // "
  USBpid                  = $77;
  USBvid                  = $BCDE;
  USBprodRel              = 203;
  USBcurrent              = 100;
//  USBvBUS                 = PortB.7;                     // port und pin, optional

  SerPortCDC              = TimeOut;
  RxBufferCDC             = 64, iData;
  TxBufferCDC             = 100, iData;

      ADCrefA        = REFextA;
      ADCprescA      = 256,12;                        // prescaler 64
      ADCchansA      = [0..2];

      I2Cport     = PortC;
      I2Cdat      = 0;
      I2Cclk      = 1, 255;

      TWIprescE   = TWI_BR400;
      
      UserPort     = 65535;
      BeepPort     = PortR,0;

      { RTC-CPU-Uhr intern }
      TickTimer   = Timer_C0;    // use Timer_C0 and no PortPin
      RTclock     = iData, DateTime;      {Time, DateTime}
      RTCsource   = SysTick;              {, adj} { adj = +/-100}

      // RS232
      SerPortC0     = 115200,Stop1,timeout;
      RxBufferC0    = 40, iData;
      TxBufferC0    = 100, iData;

      // RS232
      SerPortC1     = 115200,Stop1,timeout;
      RxBufferC1    = 40, iData;
      TxBufferC1    = 100, iData;

      // RS485
      SerPortE0     = 38400, Stop1, timeout;   {Baud, StopBits|Parity}
      SerCtrlE0     = PortE, 4, positive;
      RxBufferE0    = 40, iData;
      TxBufferE0    = 100, iData;

      // RS485
      SerPortF0     = 115200, Stop1, timeout;   {Baud, StopBits|Parity}
      SerCtrlF0     = PortF, 1, positive;
      RxBufferF0    = 40, iData;
      TxBufferF0    = 100, iData;

Uses uXmega_CDC,
     EcoDef_01,
     EcoDOS1,
     ModUST1,
     EcoReg01;

Implementation

{$IDATA}
{------------------------------------------------------------------------------}
{ Type Declarations }
Type

{--------------------------------------------------------------}
{ Const Declarations }
Const

{--------------------------------------------------------------}
{ Var Declarations }
{$IDATA}
Var
   ww : Word;
   ch : char;
   st : string[16];

{$IDATA}
{$NoSave}                  // standard register save is sufficient
{--------------------------------------------------------------}
{--------------------------------------------------------------}
Interrupt TCD0_INTOVF;
begin
     ASM: CALL System.$INTERRUPT_SYSTICK_USER;
end;
{--------------------------------------------------------------}
{--------------------------------------------------------------}
Procedure onTickTimer;          // onTickTimer(SaveAllRegs);SaveAllRegs not necessary here
begin
     ASM: CALL System.$INTERRUPT_SYSTICK_USER;
end;
{--------------------------------------------------------------}
{--------------------------------------------------------------}
(* for a UserDevice the following 3 function must be implemented *)
UserDevice UsrDevIni;
begin
end;

{--------------------------------------------------------------}
{--------------------------------------------------------------}
UserDevice UsrDevInp (adr : word) : byte;
var
   ERR    : Byte;
   EEByte : Byte;
begin
     If TWIOutE($50,adr) Then
       Err:=50;
       Repeat
         uDelay(15);
         Dec(Err);
       Until TWIInpE($50,EEByte) Or (Err=0);
       If Err=0 Then Return($ff); Else Return(EEByte); EndIf;
     EndIf;
end;

{--------------------------------------------------------------}
{--------------------------------------------------------------}
UserDevice UsrDevOut (adr : word; outp : byte);
var
   ERR   : Byte;
begin
     If TWIOutE($50,adr,outp) Then
       Err:=50;
       Repeat
         uDelay(15);
         Dec(Err);
       Until (TWIStatE($50)) Or (Err=0);
     EndIf;
End;

{--------------------------------------------------------------}
{ Init System und Ports                                        }
{ Ports DDR = Output=1  Input=0                                }
{--------------------------------------------------------------}
Procedure InitSystem;
Begin
     InitPorts;
     If RTCOk=True Then DS1307SetTime(16,10,00); EndIf;
     SetIntTime(18,38,00);
     SetIntDate(16,12,02,5);
     WatchDogStart;
     If RTCOk=False Then
       GetIntTime;
       GetIntDate;
     EndIf;
//     TestI2CUST;
End;

(*------------------------------------------------------------------*)
(* Interrupt durch interne Uhr                                      *)
(*------------------------------------------------------------------*)
Procedure RTCtickMinute;
Begin
     GetIntTime;
     GetIntDate;
     Write(SerOutC0,DateToString+' '+TimeToString+#13+#10);
End;

(*------------------------------------------------------------------*)
(*------------------------------------------------------------------*)
Procedure SendTabloDaten;
Begin
     Case (RTC.Second And $03) Of
//       0: MB_VB_FlagAmp2;|
//       2: MB_Send_Akt_Systemdaten;|
     EndCase;
End;

{--------------------------------------------------------------------}
(* Interrupt durch interne Uhr                                      *)
{--------------------------------------------------------------------}
Procedure RTCtickSecond;
Var
   xy : Byte;
begin
     WatchDogTrig;
     If SysTic=False Then
       SysTic:=True;
       StopRegelung:=True;
       Inc(RTC.Second);
       If RTC.Second>59 Then RTC.Second:=0; EndIf;

       If SysDatPoll=True Then
         xy:=0;
         Repeat
(*
           SetSerEnable(UsartE0, true);
           WriteLn(SerOutE0,ByteToStr(xy));
           SetSerEnable(UsartE0, false);
           SetSerEnable(UsartF0, true);
//           WriteLn(SerOutF0,ByteToStr(xy));
           SetSerEnable(UsartF0, false);
*)
           If Mod_2REL[xy]=$0 Then Mod_2REL[xy]:=$FF; Else Mod_2REL[xy]:=$0; EndIf;
           Read_IOD_Modul_2REL(xy);
           mDelay(15);
           Inc(xy);
         Until xy>5;
       EndIf;
       StopRegelung:=False;
     EndIf;
End;

{--------------------------------------------------------------}
{--------------------------------------------------------------}
{ Main Program }
{$IDATA}
begin
     StopRegelung:=True;
     SysTic:=True;
     EnableInts($87);                               // mandory for USB_ControlJob
     TickTimerTime(10000);     // 10000usec = 10msec
     TickTimerStart;
     InitSystem;
     ProgVersion;
     PollLED:=True;
     BeepChirpL(1);
     StopRegelung:=False;
     SysTic:=False;
     SetSerEnable(UsartE0, true);
     WriteLn(SerOutE0,'Start');
     SetSerEnable(UsartE0, false);
     loop
       WatchDogTrig;
       If SysTic Then
         PollLED:=False;
//         Regeln;
          mDelay(100);
         PollLED:=True;
         SysTic:=False;
       EndIf;
     endloop;
end.


Code
[linereset]

[device]
device=xmega256A3BU
DeviceID=$1E9843
XMega=true
XMegaTyp=XMEGA_B
POLL=$FF
PollRdy=true
HLL=true
PageSize=512
FlashWrite=true
BOOTRST0=$20000
BOOTRSTE=$20FFF
EEpage=32
RAMPZ=true
RAMPX=true
RAMPY=true
Multiply=true
MOVW=true
LPMinc=true
PDI=true
JTAG=true
JTAGN=true


[fuses_default]

[lockbitsWR0]
Adr=$07
mask=$FF
;cmd=$ACE000C0
0=LB0
1=LB1
2=BLBAT0
3=BLBAT1
4=BLBA0
5=BLBA1
6=BLBB0
7=BLBB1

[lockbitsRD0]
Adr=$07
mask=$FF
;cmd=$ACE000C0
0=LB0
1=LB1
2=BLBAT0
3=BLBAT1
4=BLBA0
5=BLBA1
6=BLBB0
7=BLBB1

[FusebitsWR0]
Adr=$00
Mask=$FF
;cmd=$ACA00000
0=JTAGUID0
1=JTAGUID1
2=JTAGUID2
3=JTAGUID3
4=JTAGUID4
5=JTAGUID5
6=JTAGUID6
7=JTAGUID7

[FusebitsRD0]
Adr=$00
Mask=$FF
;cmd=$ACA00000
0=JTAGUID0
1=JTAGUID1
2=JTAGUID2
3=JTAGUID3
4=JTAGUID4
5=JTAGUID5
6=JTAGUID6
7=JTAGUID7

[FusebitsWR1]
Adr=$01
Mask=$FF
;cmd=$ACA80000
0=WDPER0
1=WDPER1
2=WDPER2
3=WDPER3
4=WDWPER0
5=WDWPER1
6=WDWPER2
7=WDWPER3

[FusebitsRD1]
Adr=$01
Mask=$FF
;cmd=$ACA80000
0=WDPER0
1=WDPER1
2=WDPER2
3=WDPER3
4=WDWPER0
5=WDWPER1
6=WDWPER2
7=WDWPER3

[FusebitsWR2]
Adr=$02
Mask=$C3
;cmd=$ACA400f8
0=BODPD0
1=BODPD1
6=BOOTRST
7=DVSDON

[FusebitsRD2]
Adr=$02
Mask=$C3
;cmd=$ACA400f8
0=BODPD0
1=BODPD1
6=BOOTRST
7=DVSDON

[FusebitsWR4]
Adr=$04
Mask=$1F
;cmd=$ACA400f8
0=JTAGEN
1=WDLOCK
2=STARTUPTIME0
3=STARTUPTIME1
4=RSTDISBL

[FusebitsRD4]
Adr=$04
Mask=$1F
;cmd=$ACA400f8
0=JTAGEN
1=WDLOCK
2=STARTUPTIME0
3=STARTUPTIME1
4=RSTDISBL

[FusebitsWR5]
Adr=$05
Mask=$3F
;cmd=$ACA400f8
0=BODLEVEL0
1=BODLEVEL1
2=BODLEVEL2
3=EESAVE
4=BODACT0
5=BODACT1

[FusebitsRD5]
Adr=$05
Mask=$3F
;cmd=$ACA400f8
0=BODLEVEL0
1=BODLEVEL1
2=BODLEVEL2
3=EESAVE
4=BODACT0
5=BODACT1

[memory]
datastart=$0
dataend=$1f

idatastart=$2000
idataend=$5Fff

pdatastart=$00
pdataend=$1f

eepromstart=$0000
eepromend=$0fff

romtotstart=$0
romtotend=$3ffff

xdata=false

[stack]
stackptrsize=16
StackStart=0
StackEnd=0
FrameEnd=18
PCsize=24

[controlblocks]
GPIO=$0000 
VPORT0=$0010 
VPORT1=$0014 
VPORT2=$0018 
VPORT3=$001C 
CPU=$0030 
CLK=$0040 
SLEEP=$0048 
OSC=$0050 
DFLLRC32M=$0060 
DFLLRC2M=$0068 
PR=$0070 
RST=$0078 
WDT=$0080 
MCU=$0090 
PMIC=$00A0 
PORTCFG=$00B0 
AES=$00C0 
VBAT=$00F0 
DMA=$0100 
EVSYS=$0180 
NVM=$01C0 
ADCA=$0200 
ADCB=$0240 
DACB=$0320 
ACA=$0380 
ACB=$0390 
RTC32=$0420
TWIC=$0480 
TWIE=$04A0 
USB=$04C0
PORTA=$0600 
PORTB=$0620 
PORTC=$0640 
PORTD=$0660 
PORTE=$0680 
PORTF=$06A0 
PORTR=$07E0 
TCC0=$0800 
TCC1=$0840 
AWEXC=$0880 
HIRESC=$0890 
USARTC0=$08A0 
USARTC1=$08B0 
SPIC=$08C0 
IRCOM=$08F0 
TCD0=$0900 
TCD1=$0940 
HIRESD=$0990 
USARTD0=$09A0 
USARTD1=$09B0 
SPID=$09C0 
TCE0=$0A00 
TCE1=$0A40 
AWEXE=$0A80 
HIRESE=$0A90 
USARTE0=$0AA0 
TCF0=$0B00 
HIRESF=$0B90 
USARTF0=$0BA0 

[controlregs_W]
USBEPPTR=$04C6

[ProductionSignature]
RCOSC2M=$00
RCOSC32K=$02
RCOSC32M=$03
LOTNUM0=$08
LOTNUM1=$09
LOTNUM2=$0A
LOTNUM3=$0B
LOTNUM4=$0C
LOTNUM5=$0D
WAFNUM=$10
COORDX0=$12
COORDX1=$13
COORDY0=$14
COORDY1=$15
USBCAL0=$1A
USBCAL1=$1B
RCOSC48M=$1C
RCOSC48L=$1D
ADCACAL0=$20
ADCACAL1=$21
ADCBCAL0=$24
ADCBCAL1=$25
TEMPSENSE0=$2E
TEMPSENSE1=$2F
DACA0OFFCAL=$30
DACA0GAINCAL=$31
DACB0OFFCAL=$32
DACB0GAINCAL=$33
DACA1OFFCAL=$34
DACA1GAINCAL=$35
DACB1OFFCAL=$36
DACB1GAINCAL=$37

[PortMasks]
maske=$3f
maskr=$03

[controlregs]
; GPIO General Purpose IO Registers
_SCRATCH0=$0000
_SCRATCH1=$0001
_SCRATCH2=$0002
_SCRATCH3=$0003
_SCRATCH4=$0004
_SCRATCH5=$0005
_SCRATCH6=$0006
_SCRATCH7=$0007
GPIO8=$0008
GPIO9=$0009
GPIOA=$000A
GPIOB=$000B
GPIOC=$000C
GPIOD=$000D
GPIOE=$000E
GPIOF=$000F

; VPORT0 Virtual Port 0
VPORT0DDR=$0010
VPORT0PORT=$0011
VPORT0PIN=$0012
VPORT0INTFLAGS=$0013

; VPORT1 Virtual Port 1
VPORT1DDR=$0014
VPORT1PORT=$0015
VPORT1PIN=$0016
VPORT1INTFLAGS=$0017

; VPORT2 Virtual Port 2
VPORT2DDR=$0018
VPORT2PORT=$0019
VPORT2PIN=$001A
VPORT2INTFLAGS=$001B

; VPORT3 Virtual Port 3
VPORT3DDR=$001C
VPORT3PORT=$001D
VPORT3PIN=$001E
VPORT3INTFLAGS=$001F

; CPU
CCP=$0034
RAMPD=$0038
RAMPX=$0039
RAMPY=$003A
RAMPZ=$003B
EIND=$003C
SPL=$003D
SPH=$003E
SREG=$003F

; Clock Control
CLOCKCTRL=$0040
CLOCKPSCTRL=$0041
CLOCKLOCK=$0042
CLOCKRTCCTRL=$0043
CLOCKUSBCTRL=$0044

; Sleep Controller
SLEEPCTRL=$0048

; Oscillator Control
OSCCTRL=$0050
OSCSTATUS=$0051
XOSCCTRL=$0052
XOSCFAIL=$0053
RC32KCAL=$0054
PLLCTRL=$0055
DFLLCTRL=$0056

; DFLL for the 32 MHz Internal RC Oscillator
DFLL32CTRL=$0060
DFLL32CALA=$0062
DFLL32CALB=$0063
DFLL32COMP0=$0064
DFLL32COMP1=$0065
DFLL32COMP2=$0066
DFLL32COMP3=$0067

; DFLL for the 2 MHz RC Oscillator
DFLL2CTRL=$0068
DFLL2CALA=$006A
DFLL2CALB=$006B
DFLL2COMP0=$006C
DFLL2COMP1=$006D
DFLL2COMP2=$006E
DFLL2COMP3=$006F

; Power Reduction
PRGEN=$0070
PRPA=$0071
PRPB=$0072
PRPC=$0073
PRPD=$0074
PRPE=$0075
PRPF=$0076

; Reset Controller
RESETSTATUS=$0078
RESETCTRL=$0079

; Watch-Dog Timer
WDTCTRL=$0080
WINCTRL=$0081
WDTSTATUS=$0082

; MCU Control
DEVID0=$0090
DEVID1=$0091
DEVID2=$0092
REVID=$0093
JTAGUID=$0094
MCUCR=$0096
ANAINIT=$0097
EVSYSLOCK=$0098
AWEXLOCK=$0099

; Programmable Multilevel Interrupt Controller
PMICSTATUS=$00A0
PMICINTPRI=$00A1
PMICCTRL=$00A2

; Port Configuration
MPCMASK=$00B0
VPCTRLA=$00B2
VPCTRLB=$00B3
CLKEVOUT=$00B4

; AES Module
AESCTRL=$00C0
AESSTATUS=$00C1
AESSTATE=$00C2
AESKEY=$00C3
AESINTCTRL=$00C4

; CRC Nodule
CRCCTRL=$00D0
CRCSTATUS=$00D1
CRCDATAIN=$00D3
CRCCHECKSUM0=$00D4
CRCCHECKSUM1=$00D5
CRCCHECKSUM2=$00D6
CRCCHECKSUM3=$00D7

; VBAT Battery Backup System
VBATCTRL=$00F0
VBATSTATUS=$00F1
VBATBACKUP0=$00F2
VBATBACKUP1=$00F3

; DMA Controller
DMACTRL=$0100
DMAINTFLAGS=$0103
DMASTATUS=$0104
DMATEMPL=$0106
DMATEMPH=$0107

DMACH0CTRLA=$0110
DMACH0CTRLB=$0111
DMACH0ADDRCTRL=$0112
DMACH0TRIGSRC=$0113
DMACH0TRFCNTL=$0114
DMACH0TRFCNTH=$0115
DMACH0REPCNT=$0116
DMACH0SRCADDR0=$0118
DMACH0SRCADDR1=$0119
DMACH0SRCADDR2=$011A
DMACH0DESTADDR0=$011C
DMACH0DESTADDR1=$011D
DMACH0DESTADDR2=$011E

DMACH1CTRLA=$0120
DMACH1CTRLB=$0121
DMACH1ADDRCTRL=$0122
DMACH1TRIGSRC=$0123
DMACH1TRFCNTL=$0124
DMACH1TRFCNTH=$0125
DMACH1REPCNT=$0126
DMACH1SRCADDR0=$0128
DMACH1SRCADDR1=$0129
DMACH1SRCADDR2=$012A
DMACH1DESTADDR0=$012C
DMACH1DESTADDR1=$012D
DMACH1DESTADDR2=$012E

DMACH2CTRLA=$0130
DMACH2CTRLB=$0131
DMACH2ADDRCTRL=$0132
DMACH2TRIGSRC=$0133
DMACH2TRFCNTL=$0134
DMACH2TRFCNTH=$0135
DMACH2REPCNT=$0136
DMACH2SRCADDR0=$0138
DMACH2SRCADDR1=$0139
DMACH2SRCADDR2=$013A
DMACH2DESTADDR0=$013C
DMACH2DESTADDR1=$013D
DMACH2DESTADDR2=$013E

DMACH3CTRLA=$0140
DMACH3CTRLB=$0141
DMACH3ADDRCTRL=$0142
DMACH3TRIGSRC=$0143
DMACH3TRFCNTL=$0144
DMACH3TRFCNTH=$0145
DMACH3REPCNT=$0146
DMACH3SRCADDR0=$0148
DMACH3SRCADDR1=$0149
DMACH3SRCADDR2=$014A
DMACH3DESTADDR0=$014C
DMACH3DESTADDR1=$014D
DMACH3DESTADDR2=$014E

; EVSYS Event System
EVCH0MUX=$0180
EVCH1MUX=$0181
EVCH2MUX=$0182
EVCH3MUX=$0183
EVCH4MUX=$0184
EVCH5MUX=$0185
EVCH6MUX=$0186
EVCH7MUX=$0187
EVCH0CTRL=$0188
EVCH1CTRL=$0189
EVCH2CTRL=$018A
EVCH3CTRL=$018B
EVCH4CTRL=$018C
EVCH5CTRL=$018D
EVCH6CTRL=$018E
EVCH7CTRL=$018F
EVSTROBE=$0190
EVDATA=$0191

; NVM Non Volatile Memory (NVM) Controller
NVMADDR0=$01C0
NVMADDR1=$01C1
NVMADDR2=$01C2
NVMDATA0=$01C4
NVMDATA1=$01C5
NVMDATA2=$01C6
NVMCMD=$01CA
NVMCTRLA=$01CB
NVMCTRLB=$01CC
NVMINTCTRL=$01CD
NVMSTATUS=$01CF
NVMLOCKBITS=$01D0

; ADCA Analog to Digital Converter on port A
ADCACTRLA=$0200
ADCACTRLB=$0201
ADCAREFCTRL=$0202
ADCAEVCTRL=$0203
ADCAPRESCALER=$0204
ADCAINTFLAGS=$0206
ADCATEMP=$0207
ADCACALL=$020C
ADCACALH=$020D
ADCACH0RESL=$0210
ADCACH0RESH=$0211
ADCACH1RESL=$0212
ADCACH1RESH=$0213
ADCACH2RESL=$0214
ADCACH2RESH=$0215
ADCACH3RESL=$0216
ADCACH3RESH=$0217
ADCACMPL=$0218
ADCACMPH=$0219

ADCACH0CTRL=$0220
ADCACH0MUXCTRL=$0221
ADCACH0INTCTRL=$0222
ADCACH0INTFLAG=$0223
ADCARESLCH0=$0224
ADCARESHCH0=$0225

ADCACH1CTRL=$0228
ADCACH1MUXCTRL=$0229
ADCACH1INTCTRL=$022A
ADCACH1INTFLAG=$022B
ADCARESLCH1=$022C
ADCARESHCH1=$022D

ADCACH2CTRL=$0230
ADCACH2MUXCTRL=$0231
ADCACH2INTCTRL=$0232
ADCACH2INTFLAG=$0233
ADCARESLCH2=$0234
ADCARESHCH2=$0235

ADCACH3CTRL=$0238
ADCACH3MUXCTRL=$0239
ADCACH3INTCTRL=$023A
ADCACH3INTFLAG=$023B
ADCARESLCH3=$023C
ADCARESHCH3=$023D

; ADCB Analog to Digital Converter on port B
ADCBCTRLA=$0240
ADCBCTRLB=$0241
ADCBREFCTRL=$0242
ADCBEVCTRL=$0243
ADCBPRESCALER=$0244
ADCBINTFLAGS=$0246
ADCBTEMP=$0247
ADCBCALL=$024C
ADCBCALH=$024D
ADCBCH0RESL=$0250
ADCBCH0RESH=$0251
ADCBCH1RESL=$0252
ADCBCH1RESH=$0253
ADCBCH2RESL=$0254
ADCBCH2RESH=$0255
ADCBCH3RESL=$0256
ADCBCH3RESH=$0257
ADCBCMPL=$0258
ADCBCMPH=$0259

ADCBCH0CTRL=$0260
ADCBCH0MUXCTRL=$0261
ADCBCH0INTCTRL=$0262
ADCBCH0INTFLAG=$0263
ADCBRESLCH0=$0264
ADCBRESHCH0=$0265

ADCBCH1CTRL=$0268
ADCBCH1MUXCTRL=$0269
ADCBCH1INTCTRL=$026A
ADCBCH1INTFLAG=$026B
ADCBRESLCH1=$026C
ADCBRESHCH1=$026D

ADCBCH2CTRL=$0270
ADCBCH2MUXCTRL=$0271
ADCBCH2INTCTRL=$0272
ADCBCH2INTFLAG=$0273
ADCBRESLCH2=$0274
ADCBRESHCH2=$0275

ADCBCH3CTRL=$0278
ADCBCH3MUXCTRL=$0279
ADCBCH3INTCTRL=$027A
ADCBCH3INTFLAG=$027B
ADCBRESLCH3=$027C
ADCBRESHCH3=$027D

; DACB Digital to Analog Converter on port B
DACBCTRLA=$0320
DACBCTRLB=$0321
DACBCTRLC=$0322
DACBEVCTRL=$0323
DACBTIMCTRL=$0324
DACBSTATUS=$0325
DACBGAINCAL=$0328
DACBOFFSETCAL=$0329
DACBCH0DATAL=$0338
DACBCH0DATAH=$0339
DACBCH1DATAL=$033A
DACBCH1DATAH=$033B

; ACA Analog Comparator pair on port A
ACAAC0CTRL=$0380
ACAAC1CTRL=$0381
ACAAC0MUXCTR=$0382
ACAAC1MUXCTR=$0383
ACACTRLA=$0384
ACACTRLB=$0385
ACAWINCTRL=$0386
ACASTATUS=$0387

; ACB Analog Comparator pair on port B
ACBAC0CTRL=$0390
ACBAC1CTRL=$0391
ACBAC0MUXCTR=$0392
ACBAC1MUXCTR=$0393
ACBCTRLA=$0394
ACBCTRLB=$0395
ACBWINCTRL=$0396
ACBSTATUS=$0397

; RTC32 32-bit Real Time Counter
RTC32CTRL=$0420
RTC32SYNCCTRL=$0421
RTC32INTCTRL=$0422
RTC32INTFLAGS=$0423
RTC32CNT0=$0424
RTC32CNT1=$0425
RTC32CNT2=$0426
RTC32CNT3=$0427
RTC32PER0=$0428
RTC32PER1=$0429
RTC32PER2=$042A
RTC32PER3=$042B
RTC32COMP0=$042C
RTC32COMP1=$042D
RTC32COMP2=$042E
RTC32COMP3=$042F

; TWIC Two Wire Interface on port C
TWICCTRL=$0480
TWICMASTERCTRLA=$0481
TWICMASTERCTRLB=$0482
TWICMASTERCTRLC=$0483
TWICMASTERSTATUS=$0484
TWICMASTERBAUD=$0485
TWICMASTERADDR=$0486
TWICMASTERDATA=$0487

TWICSLAVECTRLA=$0488
TWICSLAVECTRLB=$0489
TWICSLAVESTATUS=$048A
TWICSLAVEADDR=$048B
TWICSLAVEDATA=$048C
TWICSLAVEADDRMASK=$048D

; TWIE Two Wire Interface on port E
TWIECTRL=$04A0
TWIEMASTERCTRLA=$04A1
TWIEMASTERCTRLB=$04A2
TWIEMASTERCTRLC=$04A3
TWIEMASTERSTATUS=$04A4
TWIEMASTERBAUD=$04A5
TWIEMASTERADDR=$04A6
TWIEMASTERDATA=$04A7

TWIESLAVECTRLA=$04A8
TWIESLAVECTRLB=$04A9
TWIESLAVESTATUS=$04AA
TWIESLAVEADDR=$04AB
TWIESLAVEDATA=$04AC
TWIESLAVEADDRMASK=$04AD

; USB Interface on port D
USBCTRLA=$04C0
USBCTRLB=$04C1
USBSTATUS=$04C2
USBADDR=$04C3
USBFIFOWP=$04C4
USBFIFORP=$04C5
USBEPPTRL=$04C6
USBEPPTRH=$04C7
USBINTCTRLA=$04C8
USBINTCTRLB=$04C9
USBINTFLAGSACLR=$04CA
USBINTFLAGSASET=$04CB
USBINTFLAGSBCLR=$04CC
USBINTFLAGSBSET=$04CD
USBCALL=$04FA
USBCALH=$04FB

; Port A
DDRA=$600
DIRSETA=$601
DIRCLRA=$602
DIRTGLA=$603
PORTA=$604
OUTSETA=$605
OUTCLRA=$606
OUTTGLA=$607
PINA=$608
INTCTRLA=$609
INT0MASKA=$60A
INT1MASKA=$60B
INTFLAGSA=$60C
PIN0CTRLA=$610
PIN1CTRLA=$611
PIN2CTRLA=$612
PIN3CTRLA=$613
PIN4CTRLA=$614
PIN5CTRLA=$615
PIN6CTRLA=$616
PIN7CTRLA=$617

; Port B
DDRB=$620
DIRSETB=$621
DIRCLRB=$622
DIRTGLB=$623
PORTB=$624
OUTSETB=$625
OUTCLRB=$626
OUTTGLB=$627
PINB=$628
INTCTRLB=$629
INT0MASKB=$62A
INT1MASKB=$62B
INTFLAGSB=$62C
PIN0CTRLB=$630
PIN1CTRLB=$631
PIN2CTRLB=$632
PIN3CTRLB=$633
PIN4CTRLB=$634
PIN5CTRLB=$635
PIN6CTRLB=$636
PIN7CTRLB=$637

; Port C
DDRC=$640
DIRSETC=$641
DIRCLRC=$642
DIRTGLC=$643
PORTC=$644
OUTSETC=$645
OUTCLRC=$646
OUTTGLC=$647
PINC=$648
INTCTRLC=$649
INT0MASKC=$64A
INT1MASKC=$64B
INTFLAGSC=$64C
REMAPC=$64E
PIN0CTRLC=$650
PIN1CTRLC=$651
PIN2CTRLC=$652
PIN3CTRLC=$653
PIN4CTRLC=$654
PIN5CTRLC=$655
PIN6CTRLC=$656
PIN7CTRLC=$657

; Port D
DDRD=$660
DIRSETD=$661
DIRCLRD=$662
DIRTGLD=$663
PORTD=$664
OUTSETD=$665
OUTCLRD=$666
OUTTGLD=$667
PIND=$668
INTCTRLD=$669
INT0MASKD=$66A
INT1MASKD=$66B
INTFLAGSD=$66C
REMAPD=$66E
PIN0CTRLD=$670
PIN1CTRLD=$671
PIN2CTRLD=$672
PIN3CTRLD=$673
PIN4CTRLD=$674
PIN5CTRLD=$675
PIN6CTRLD=$676
PIN7CTRLD=$677

; Port E
DDRE=$680
DIRSETE=$681
DIRCLRE=$682
DIRTGLE=$683
PORTE=$684
OUTSETE=$685
OUTCLRE=$686
OUTTGLE=$687
PINE=$688
INTCTRLE=$689
INT0MASKE=$68A
INT1MASKE=$68B
INTFLAGSE=$68C
REMAPE=$68E
PIN0CTRLE=$690
PIN1CTRLE=$691
PIN2CTRLE=$692
PIN3CTRLE=$693
PIN4CTRLE=$694
PIN5CTRLE=$695
PIN6CTRLE=$696
PIN7CTRLE=$697

; PORTF Port F
DDRF=$6A0
DIRSETF=$6A1
DIRCLRF=$6A2
DIRTGLF=$6A3
PORTF=$6A4
OUTSETF=$6A5
OUTCLRF=$6A6
OUTTGLF=$6A7
PINF=$6A8
INTCTRLF=$6A9
INT0MASKF=$6AA
INT1MASKF=$6AB
INTFLAGSF=$6AC
REMAPF=$6AE
PIN0CTRLF=$6B0
PIN1CTRLF=$6B1
PIN2CTRLF=$6B2
PIN3CTRLF=$6B3
PIN4CTRLF=$6B4
PIN5CTRLF=$6B5
PIN6CTRLF=$6B6
PIN7CTRLF=$6B7

; Port R
DDRR=$7E0
DIRSETR=$7E1
DIRCLRR=$7E2
DIRTGLR=$7E3
PORTR=$7E4
OUTSETR=$7E5
OUTCLRR=$7E6
OUTTGLR=$7E7
PINR=$7E8
INTCTRLR=$7E9
INT0MASKR=$7EA
INT1MASKR=$7EB
INTFLAGSR=$7EC
PIN0CTRLR=$7F0
PIN1CTRLR=$7F1
PIN2CTRLR=$7F2
PIN3CTRLR=$7F3
PIN4CTRLR=$7F4
PIN5CTRLR=$7F5
PIN6CTRLR=$7F6
PIN7CTRLR=$7F7

; TCC0 Timer/Counter 0 on port C
TCC0CTRLA=$0800
TCC0CTRLB=$0801
TCC0CTRLC=$0802
TCC0CTRLD=$0803
TCC0CTRLE=$0804
TCC0INTCTRLA=$0806
TCC0INTCTRLB=$0807
TCC0CTRLFCLR=$0808
TCC0CTRLFSET=$0809
TCC0CTRLGCLR=$080A
TCC0CTRLGSET=$080B
TCC0INTFLAGS=$080C
TCC0TEMP=$080F
TCC0CNTL=$0820
TCC0CNTH=$0821
TCC0PERL=$0826
TCC0PERH=$0827
TCC0CCAL=$0828
TCC0CCAH=$0829
TCC0CCBL=$082A
TCC0CCBH=$082B
TCC0CCCL=$082C
TCC0CCCH=$082D
TCC0CCDL=$082E
TCC0CCDH=$082F
TCC0PERBUFL=$0836
TCC0PERBUFH=$0837
TCC0CCABUFL=$0838
TCC0CCABUFH=$0839
TCC0CCBBUFL=$083A
TCC0CCBBUFH=$083B
TCC0CCCBUFL=$083C
TCC0CCCBUFH=$083D
TCC0CCDBUFL=$083E
TCC0CCDBUFH=$083F

; TCC1 Timer/Counter 1 on port C
TCC1CTRLA=$0840
TCC1CTRLB=$0841
TCC1CTRLC=$0842
TCC1CTRLD=$0843
TCC1CTRLE=$0844
TCC1INTCTRLA=$0846
TCC1INTCTRLB=$0847
TCC1CTRLFCLR=$0848
TCC1CTRLFSET=$0849
TCC1CTRLGCLR=$084A
TCC1CTRLGSET=$084B
TCC1INTFLAGS=$084C
TCC1TEMP=$084F
TCC1CNTL=$0860
TCC1CNTH=$0861
TCC1PERL=$0866
TCC1PERH=$0867
TCC1CCAL=$0868
TCC1CCAH=$0869
TCC1CCBL=$086A
TCC1CCBH=$086B
TCC1CCCL=$086C
TCC1CCCH=$086D
TCC1CCDL=$086E
TCC1CCDH=$086F
TCC1PERBUFL=$0876
TCC1PERBUFH=$0877
TCC1CCABUFL=$0878
TCC1CCABUFH=$0879
TCC1CCBBUFL=$087A
TCC1CCBBUFH=$087B
TCC1CCCBUFL=$087C
TCC1CCCBUFH=$087D
TCC1CCDBUFL=$087E
TCC1CCDBUFH=$087F

; AWEXC Advanced Waveform Extension on port C
AWEXCCTRL=$0880
AWEXCFDEMASK=$0882
AWEXCFDCTRL=$0883
AWEXCSTATUS=$0884
AWEXCDTBOTH=$0886
AWEXCDTBOTHBUF=$0887
AWEXCDTLS=$0888
AWEXCDTHS=$0889
AWEXCDTLSBUF=$088A
AWEXCDTHSBUF=$088B
AWEXCOUTOVEN=$088C

; HIRESC High Resolution Extension on port C
HIRESCCTRLA=$0890

; USARTC0 USART 0 on port C
USARTC0DATA=$08A0
USARTC0STATUS=$08A1
USARTC0CTRLA=$08A3
USARTC0CTRLB=$08A4
USARTC0CTRLC=$08A5
USARTC0BAUDCTRLA=$08A6
USARTC0BAUDCTRLB=$08A7

; USARTC1 USART 1 on port C
USARTC1DATA=$08B0
USARTC1STATUS=$08B1
USARTC1CTRLA=$08B3
USARTC1CTRLB=$08B4
USARTC1CTRLC=$08B5
USARTC1BAUDCTRLA=$08B6
USARTC1BAUDCTRLB=$08B7

; SPIC Serial Peripheral Interface on port C
SPICCTRL=$08C0
SPICINTCTRL=$08C1
SPICSTATUS=$08C2
SPICDATA=$08C3

; IRCOM Infrared Communication Module
IRCOMTXPLCTRL=$08F0
IRCOMRXPLCTRL=$08F1
IRCOMCTRL=$08F2

; TCD0 Timer/Counter 0 on port D
TCD0CTRLA=$0900
TCD0CTRLB=$0901
TCD0CTRLC=$0902
TCD0CTRLD=$0903
TCD0CTRLE=$0904
TCD0INTCTRLA=$0906
TCD0INTCTRLB=$0907
TCD0CTRLFCLR=$0908
TCD0CTRLFSET=$0909
TCD0CTRLGCLR=$090A
TCD0CTRLGSET=$090B
TCD0INTFLAGS=$090C
TCD0TEMP=$090F
TCD0CNTL=$0920
TCD0CNTH=$0921
TCD0PERL=$0926
TCD0PERH=$0927
TCD0CCAL=$0928
TCD0CCAH=$0929
TCD0CCBL=$092A
TCD0CCBH=$092B
TCD0CCCL=$092C
TCD0CCCH=$092D
TCD0CCDL=$092E
TCD0CCDH=$092F
TCD0PERBUFL=$0936
TCD0PERBUFH=$0937
TCD0CCABUFL=$0938
TCD0CCABUFH=$0939
TCD0CCBBUFL=$093A
TCD0CCBBUFH=$093B
TCD0CCCBUFL=$093C
TCD0CCCBUFH=$093D
TCD0CCDBUFL=$093E
TCD0CCDBUFH=$093F

; TCD1 Timer/Counter 1 on port D
TCD1CTRLA=$0940
TCD1CTRLB=$0941
TCD1CTRLC=$0942
TCD1CTRLD=$0943
TCD1CTRLE=$0944
TCD1INTCTRLA=$0946
TCD1INTCTRLB=$0947
TCD1CTRLFCLR=$0948
TCD1CTRLFSET=$0949
TCD1CTRLGCLR=$094A
TCD1CTRLGSET=$094B
TCD1INTFLAGS=$094C
TCD1TEMP=$094F
TCD1CNTL=$0960
TCD1CNTH=$0961
TCD1PERL=$0966
TCD1PERH=$0967
TCD1CCAL=$0968
TCD1CCAH=$0969
TCD1CCBL=$096A
TCD1CCBH=$096B
TCD1CCCL=$096C
TCD1CCCH=$096D
TCD1CCDL=$096E
TCD1CCDH=$096F
TCD1PERBUFL=$0976
TCD1PERBUFH=$0977
TCD1CCABUFL=$0978
TCD1CCABUFH=$0979
TCD1CCBBUFL=$097A
TCD1CCBBUFH=$097B
TCD1CCCBUFL=$097C
TCD1CCCBUFH=$097D
TCD1CCDBUFL=$097E
TCD1CCDBUFH=$097F

; HIRESD High Resolution Extension on port D
HIRESDCTRLA=$0990

; USARTD0 USART 0 on port D
USARTD0DATA=$09A0
USARTD0STATUS=$09A1
USARTD0CTRLA=$09A3
USARTD0CTRLB=$09A4
USARTD0CTRLC=$09A5
USARTD0BAUDCTRLA=$09A6
USARTD0BAUDCTRLB=$09A7

; USARTD1 USART 1 on port D
USARTD1DATA=$09B0
USARTD1STATUS=$09B1
USARTD1CTRLA=$09B3
USARTD1CTRLB=$09B4
USARTD1CTRLC=$09B5
USARTD1BAUDCTRLA=$09B6
USARTD1BAUDCTRLB=$09B7

; SPID Serial Peripheral Interface on port D
SPIDCTRL=$09C0
SPIDINTCTRL=$09C1
SPIDSTATUS=$09C2
SPIDDATA=$09C3

; TCE0 Timer/Counter 0 on port E
TCE0CTRLA=$0A00
TCE0CTRLB=$0A01
TCE0CTRLC=$0A02
TCE0CTRLD=$0A03
TCE0CTRLE=$0A04
TCE0INTCTRLA=$0A06
TCE0INTCTRLB=$0A07
TCE0CTRLFCLR=$0A08
TCE0CTRLFSET=$0A09
TCE0CTRLGCLR=$0A0A
TCE0CTRLGSET=$0A0B
TCE0INTFLAGS=$0A0C
TCE0TEMP=$0A0F
TCE0CNTL=$0A20
TCE0CNTH=$0A21
TCE0PERL=$0A26
TCE0PERH=$0A27
TCE0CCAL=$0A28
TCE0CCAH=$0A29
TCE0CCBL=$0A2A
TCE0CCBH=$0A2B
TCE0CCCL=$0A2C
TCE0CCCH=$0A2D
TCE0CCDL=$0A2E
TCE0CCDH=$0A2F
TCE0PERBUFL=$0A36
TCE0PERBUFH=$0A37
TCE0CCABUFL=$0A38
TCE0CCABUFH=$0A39
TCE0CCBBUFL=$0A3A
TCE0CCBBUFH=$0A3B
TCE0CCCBUFL=$0A3C
TCE0CCCBUFH=$0A3D
TCE0CCDBUFL=$0A3E
TCE0CCDBUFH=$0A3F

; TCE1 Timer/Counter 1 on port E
TCE1CTRLA=$0A40
TCE1CTRLB=$0A41
TCE1CTRLC=$0A42
TCE1CTRLD=$0A43
TCE1CTRLE=$0A44
TCE1INTCTRLA=$0A46
TCE1INTCTRLB=$0A47
TCE1CTRLFCLR=$0A48
TCE1CTRLFSET=$0A49
TCE1CTRLGCLR=$0A4A
TCE1CTRLGSET=$0A4B
TCE1INTFLAGS=$0A4C
TCE1TEMP=$0A4F
TCE1CNTL=$0A60
TCE1CNTH=$0A61
TCE1PERL=$0A66
TCE1PERH=$0A67
TCE1CCAL=$0A68
TCE1CCAH=$0A69
TCE1CCBL=$0A6A
TCE1CCBH=$0A6B
TCE1CCCL=$0A6C
TCE1CCCH=$0A6D
TCE1CCDL=$0A6E
TCE1CCDH=$0A6F
TCE1PERBUFL=$0A76
TCE1PERBUFH=$0A77
TCE1CCABUFL=$0A78
TCE1CCABUFH=$0A79
TCE1CCBBUFL=$0A7A
TCE1CCBBUFH=$0A7B
TCE1CCCBUFL=$0A7C
TCE1CCCBUFH=$0A7D
TCE1CCDBUFL=$0A7E
TCE1CCDBUFH=$0A7F

; AWEXE Advanced Waveform Extension on port E
AWEXECTRL=$0A80
AWEXEFDEMASK=$0A82
AWEXEFDCTRL=$0A83
AWEXESTATUS=$0A84
AWEXEDTBOTH=$0A86
AWEXEDTBOTHBUF=$0A87
AWEXEDTLS=$0A88
AWEXEDTHS=$0A89
AWEXEDTLSBUF=$0A8A
AWEXEDTHSBUF=$0A8B
AWEXEOUTOVEN=$0A8C

; HIRESE High Resolution Extension on port E
HIRESECTRLA=$0A90

; USARTE0 USART 0 on port E
USARTE0DATA=$0AA0
USARTE0STATUS=$0AA1
USARTE0CTRLA=$0AA3
USARTE0CTRLB=$0AA4
USARTE0CTRLC=$0AA5
USARTE0BAUDCTRLA=$0AA6
USARTE0BAUDCTRLB=$0AA7

; TCF0 Timer/Counter 0 on port F
TCF0CTRLA=$0B00
TCF0CTRLB=$0B01
TCF0CTRLC=$0B02
TCF0CTRLD=$0B03
TCF0CTRLE=$0B04
TCF0INTCTRLA=$0B06
TCF0INTCTRLB=$0B07
TCF0CTRLFCLR=$0B08
TCF0CTRLFSET=$0B09
TCF0CTRLGCLR=$0B0A
TCF0CTRLGSET=$0B0B
TCF0INTFLAGS=$0B0C
TCF0TEMP=$0B0F
TCF0CNTL=$0B20
TCF0CNTH=$0B21
TCF0PERL=$0B26
TCF0PERH=$0B27
TCF0CCAL=$0B28
TCF0CCAH=$0B29
TCF0CCBL=$0B2A
TCF0CCBH=$0B2B
TCF0CCCL=$0B2C
TCF0CCCH=$0B2D
TCF0CCDL=$0B2E
TCF0CCDH=$0B2F
TCF0PERBUFL=$0B36
TCF0PERBUFH=$0B37
TCF0CCABUFL=$0B38
TCF0CCABUFH=$0B39
TCF0CCBBUFL=$0B3A
TCF0CCBBUFH=$0B3B
TCF0CCCBUFL=$0B3C
TCF0CCCBUFH=$0B3D
TCF0CCDBUFL=$0B3E
TCF0CCDBUFH=$0B3F

; HIRESF High Resolution Extension on port F
HIRESFCTRLA=$0B90

; USARTF0 USART 0 on port F
USARTF0DATA=$0BA0
USARTF0STATUS=$0BA1
USARTF0CTRLA=$0BA3
USARTF0CTRLB=$0BA4
USARTF0CTRLC=$0BA5
USARTF0BAUDCTRLA=$0BA6
USARTF0BAUDCTRLB=$0BA7

[controlbits]

[BootVectors]

[PCINT]
PCINTA=true
PCINTB=true
PCINTC=true
PCINTD=true
PCINTE=true
PCINTF=true
PCINTR=true

[interruptvectors]
vectormethod=JMP
nrofvectors=125
; $0000 RESET
vectnr0=RESET
; $0002 OSCF_INT_vect Crystal Oscillator Failure Interrupt vector (NMI)
vectnr1=OSCF_INT

; $0004 PORTC_INT_base Port C Interrupt base
vectnr2=PORTC_INT0
vectnr3=PORTC_INT1

; $0008 PORTR_INT_base Port R Interrupt base
vectnr4=PORTR_INT0
vectnr5=PORTR_INT1

; $000C DMA_INT_base DMA Controller Interrupt base
vectnr6=DMA_INTCH0
vectnr7=DMA_INTCH1
vectnr8=DMA_INTCH2
vectnr9=DMA_INTCH3

; $0014 RTC_INT_base Real Time Counter Interrupt base
vectnr10=RTC_INTOVF
vectnr11=RTC_INTCOMP

; $0018 TWIC_INT_base Two-Wire Interface on Port C Interrupt base
vectnr12=TWIC_INTSLAVE
vectnr13=TWIC_INTMASTER

; $001C TCC0_INT_base Timer/Counter 0 on port C Interrupt base
vectnr14=TCC0_INTOVF
vectnr15=TCC0_INTERR
vectnr16=TCC0_INTCCA
vectnr17=TCC0_INTCCB
vectnr18=TCC0_INTCCC
vectnr19=TCC0_INTCCD

; $0028 TCC1_INT_base Timer/Counter 1 on port C Interrupt base
vectnr20=TCC1_INTOVF
vectnr21=TCC1_INTERR
vectnr22=TCC1_INTCCA
vectnr23=TCC1_INTCCB

; $0030 SPIC_INT_vect SPI on port C Interrupt vector
vectnr24=SPIC_INT

; $0032 USARTC0_INT_base USART 0 on port C Interrupt base
vectnr25=USARTC0_INTRXC
vectnr26=USARTC0_INTDRE
vectnr27=USARTC0_INTTXC

; $0038 USARTC1_INT_base USART 1 on port C Interrupt base
vectnr28=USARTC1_INTRXC
vectnr29=USARTC1_INTDRE
vectnr30=USARTC1_INTTXC

; $003E AES_INT_vect AES Interrupt vector
vectnr31=AES_INT

; $0040 NVM_INT_base Non-Volatile Memory Interrupt base
vectnr32=NVM_INTSPM
vectnr33=NVM_INTEE

; $0044 PORTB_INT_base Port B Interrupt base
vectnr34=PORTB_INT0
vectnr35=PORTB_INT1

; $0048 ACB_INT_base Analog Comparator on Port B Interrupt base
vectnr36=ACB_INTCOMP0
vectnr37=ACB_INTCOMP1
vectnr38=ACB_INTWINDOW

; $004E ADCB_INT_base Analog to Digital Converter on Port B Interrupt base
vectnr39=ADCB_INTCH0
vectnr40=ADCB_INTCH1
vectnr41=ADCB_INTCH2
vectnr42=ADCB_INTCH3

; $0056 PORTE_INT_base Port E Interrupt base
vectnr43=PORTE_INT0
vectnr44=PORTE_INT1

; $005A TWIE_INT_base Two-Wire Interface on Port E Interrupt base
vectnr45=TWIE_INTSLAVE
vectnr46=TWIE_INTMASTER

; $005E TCE0_INT_base Timer/Counter 0 on port E Interrupt base
vectnr47=TCE0_INTOVF
vectnr48=TCE0_INTERR
vectnr49=TCE0_INTCCA
vectnr50=TCE0_INTCCB
vectnr51=TCE0_INTCCC
vectnr52=TCE0_INTCCD

; $006A TCE1_INT_base Timer/Counter 1 on port E Interrupt base
vectnr53=TCE1_INTOVF
vectnr54=TCE1_INTERR
vectnr55=TCE1_INTCCA
vectnr56=TCE1_INTCCB

; $0072 SPIE_INT_vect SPI on port E Interrupt vector
vectnr57=SPIE_INT

; $0074 USARTE0_INT_base USART 0 on port E Interrupt base
vectnr58=USARTE0_INTRXC
vectnr59=USARTE0_INTDRE
vectnr60=USARTE0_INTTXC

; $007A USARTE1_INT_base USART 1 on port E Interrupt base
vectnr61=USARTE1_INTRXC
vectnr62=USARTE1_INTDRE
vectnr63=USARTE1_INTTXC

; $0080 PORTD_INT_base Port D Interrupt base
vectnr64=PORTD_INT0
vectnr65=PORTD_INT1

; $0084 PORTA_INT_base Port A Interrupt base
vectnr66=PORTA_INT0
vectnr67=PORTA_INT1

; $0088 ACA_INT_base Analog Comparator on Port A Interrupt base
vectnr68=ACA_INTCOMP0
vectnr69=ACA_INTCOMP1
vectnr70=ACA_INTWINDOW

; $008E ADCA_INT_base Analog to Digital Converter on Port A Interrupt base
vectnr71=ADCA_INTCH0
vectnr72=ADCA_INTCH1
vectnr73=ADCA_INTCH2
vectnr74=ADCA_INTCH3

; $0096 TWID_INT_base Two-Wire Interface on Port D Interrupt base
vectnr75=TWID_INTSLAVE
vectnr76=TWID_INTMASTER

; $009A TCD0_INT_base Timer/Counter 0 on port D Interrupt base
vectnr77=TCD0_INTOVF
vectnr78=TCD0_INTERR
vectnr79=TCD0_INTCCA
vectnr80=TCD0_INTCCB
vectnr81=TCD0_INTCCC
vectnr82=TCD0_INTCCD

; $00A6 TCD1_INT_base Timer/Counter 1 on port D Interrupt base
vectnr83=TCD1_INTOVF
vectnr84=TCD1_INTERR
vectnr85=TCD1_INTCCA
vectnr86=TCD1_INTCCB

; $00AE SPID_INT_vector SPI on port D Interrupt vector
vectnr87=SPID_INT

; $00B0 USARTD0_INT_base USART 0 on port D Interrupt base
vectnr88=USARTD0_INTRXC
vectnr89=USARTD0_INTDRE
vectnr90=USARTD0_INTTXC

; $00B6 USARTD1_INT_base USART 1 on port D Interrupt base
vectnr91=USARTD1_INTRXC
vectnr92=USARTD1_INTDRE
vectnr93=USARTD1_INTTXC

; $00BC PORTQ_INT_base Port Q INT base
vectnr94=PORTQ_INT0
vectnr95=PORTQ_INT1

; $00C0 PORTH_INT_base Port H INT base
vectnr96=PORTH_INT0
vectnr97=PORTH_INT1

; $00C4 PORTJ_INT_base Port J INT base
vectnr98=PORTJ_INT0
vectnr99=PORTJ_INT1

; $00C8 PORTK_INT_base Port K INT base
vectnr100=PORTK_INT0
vectnr101=PORTK_INT1

; $00CC RESERVED
vectnr102=DEFINTERR
vectnr103=DEFINTERR

; $00D0 PORTF_INT_base Port F INT base
vectnr104=PORTF_INT0
vectnr105=PORTF_INT1

; $00D4 TWIF_INT_base Two-Wire Interface on Port F INT base
vectnr106=TWIF_INTSLAVE
vectnr107=TWIF_INTMASTER

; $00D8 TCF0_INT_base Timer/Counter 0 on port F Interrupt base
vectnr108=TCF0_INTOVF
vectnr109=TCF0_INTERR
vectnr110=TCF0_INTCCA
vectnr111=TCF0_INTCCB
vectnr112=TCF0_INTCCC
vectnr113=TCF0_INTCCD

; $00E4 TCF1_INT_base Timer/Counter 1 on port F Interrupt base
vectnr114=TCF1_INTOVF
vectnr115=TCF1_INTERR
vectnr116=TCF1_INTCCA
vectnr117=TCF1_INTCCB

; $00EC SPIF_INT_vector SPI ion port F Interrupt base
vectnr118=SPIF_INT

; $00EE USARTF0_INT_base USART 0 on port F Interrupt base
vectnr119=USARTF0_INTRXC
vectnr120=USARTF0_INTDRE
vectnr121=USARTF0_INTTXC

; $00F4 USARTF1_INT_base USART 1 on port F Interrupt base
vectnr122=USARTF1_INTRXC
vectnr123=USARTF1_INTDRE
vectnr124=USARTF1_INTTXC

; $00FA USB_INT_base on port D 
vectnr125=BUSEVENT 
vectnr126=TRNCOMPL 

[peripheral]
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: XMEGA256A3BU mit USB

 · 
Posted: 07.12.2016 - 17:37  ·  #5
Hallo wom,

sehr schön, aber was tritt jetzt für ein Fehler auf ???????

rolf
wom
 
Avatar
 
Subject:

Re: XMEGA256A3BU mit USB

 · 
Posted: 07.12.2016 - 19:45  ·  #6
Hallo,

der gleiche wider

unknown int : TRNCOMPL und BUSEVENT
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: XMEGA256A3BU mit USB

 · 
Posted: 08.12.2016 - 15:19  ·  #7
Hallo wom,

sorry, da muss noch eine weitere Zeile im DSC geändert werden:
Code
[interruptvectors]
vectormethod=JMP
nrofvectors=127

125 nach 127 ändern.

rolf
wom
 
Avatar
 
Subject:

Re: XMEGA256A3BU mit USB

 · 
Posted: 11.12.2016 - 18:40  ·  #8
Hallo Rolf,
nun arbeitet die USB.

gruß
wom
  • 1
  • 2
  • Page 1 of 2
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 15 · Cache Hits: 14   137   151 · Page-Gen-Time: 0.042672s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI