]> www.hackdaworld.org Git - my-code/atmel.git/blob - include/AT86RF401def.inc
fixed stupid mistake
[my-code/atmel.git] / include / AT86RF401def.inc
1 ;****************************************************************************************\r
2 ;* This can be included in the assembly file\r
3 ;* in order to use the names in the spec sheet.\r
4 ;* \r
5 ;* I/O Register Definitions per AT86RF401 spec\r
6 ;****************************************************************************************\r
7 \r
8 ;***** device directive, will make the assembler check for illegal instructions.\r
9 .device AT86RF401\r
10 \r
11 ;***** I/O Register Definitions\r
12 .equ    SREG            =$3F    ; Status \r
13 .equ    SPH             =$3E    ; Stack Pointer High \r
14 .equ    SPL             =$3D    ; Stack Pointer Low \r
15 .equ    BL_CONFIG       =$35    ; Battery Low Configuration \r
16 .equ    B_DET           =$34    ; Button Detect \r
17 .equ    PWR_CTL         =$33    ; Power Control \r
18 .equ    IO_DATIN        =$32    ; I/O Data In \r
19 .equ    IO_DATOUT       =$31    ; I/O Data Out \r
20 .equ    IO_ENAB         =$30    ; I/O Enable\r
21 .equ    WDTCR       =$22    ; Watchdog Timer Control\r
22 .equ    BTCR            =$21    ; Bit Timer Control\r
23 .equ    BTCNT       =$20    ; Bit Timer Count\r
24 .equ    DEEAR           =$1E    ; Data EEPROM Address\r
25 .equ    DEEDR           =$1D    ; Data EEPROM Data\r
26 .equ    DEECR           =$1C    ; Data EEPROM Control\r
27 .equ    LOCKDET2        =$17    ; Lock Detector Configuration Register 2\r
28 .equ    VCOTUNE         =$16    ; VCO Tuning Register\r
29 .equ    PWR_ATTEN       =$14    ; Power Attenuation Control Register\r
30 .equ    TX_CNTL     =$12    ; Transmitter Control Register\r
31 .equ    LOCKDET1        =$10    ; Lock Detector Configuration Register 1\r
32 .equ    SRAM_START      =$0060  ; Start of RAM\r
33 .equ    SRAM_END        =$00DF  ; End of RAM\r
34 \r
35 ;**** Bit Definitions\r
36 ; SREG\r
37 .equ    I               =7\r
38 .equ    T               =6\r
39 .equ    H               =5\r
40 .equ    S               =4\r
41 .equ    V               =3\r
42 .equ    N               =2\r
43 .equ    Z               =1\r
44 .equ    C               =0\r
45 \r
46 ; BL_CONFIG\r
47 .equ    BL              =7\r
48 .equ    BLV             =6\r
49 .equ    BL5             =5\r
50 .equ    BL4             =4\r
51 .equ    BL3             =3\r
52 .equ    BL2             =2\r
53 .equ    BL1             =1\r
54 .equ    BL0             =0\r
55 \r
56 ; B_DET\r
57 .equ    BD5             =5\r
58 .equ    BD4             =4\r
59 .equ    BD3             =3\r
60 .equ    BD2             =2\r
61 .equ    BD1             =1\r
62 .equ    BD0             =0\r
63 \r
64 ; PWR_CTL\r
65 .equ    ACS2    =7\r
66 .equ    ACS1    =6\r
67 .equ    ACS0    =5\r
68 .equ    TM              =4\r
69 .equ    BD              =3\r
70 .equ    BLI             =2\r
71 .equ    SLEEP   =1\r
72 .equ    BBM             =0\r
73 \r
74 ; IO_DATIN\r
75 .equ    IOI5    =5\r
76 .equ    IOI4    =4\r
77 .equ    IOI3    =3\r
78 .equ    IOI2    =2\r
79 .equ    IOI1    =1\r
80 .equ    IOI0    =0\r
81 \r
82 ; IO_DATOUT\r
83 .equ    IOO5    =5\r
84 .equ    IOO4    =4\r
85 .equ    IOO3    =3\r
86 .equ    IOO2    =2\r
87 .equ    IOO1    =1\r
88 .equ    IOO0    =0\r
89 \r
90 ; IO_ENAB\r
91 .equ    BOHYST  =6\r
92 .equ    IOE5    =5\r
93 .equ    IOE4    =4\r
94 .equ    IOE3    =3\r
95 .equ    IOE2    =2\r
96 .equ    IOE1    =1\r
97 .equ    IOE0    =0\r
98 \r
99 ; WDTCR\r
100 .equ    WDTOE   =4\r
101 .equ    WDE             =3\r
102 .equ    WDP2    =2\r
103 .equ    WDP1    =1\r
104 .equ    WDP0    =0\r
105 \r
106 ; BTCR\r
107 .equ    C9              =7\r
108 .equ    C8              =6\r
109 .equ    M1              =5\r
110 .equ    M0              =4\r
111 .equ    IE              =3\r
112 .equ    F2              =2\r
113 .equ    DATA    =1\r
114 .equ    F0              =0\r
115 \r
116 ; BTCNT\r
117 .equ    C7              =7\r
118 .equ    C6              =6\r
119 .equ    C5              =5\r
120 .equ    C4              =4\r
121 .equ    C3              =3\r
122 .equ    C2              =2\r
123 .equ    C1              =1\r
124 .equ    C0              =0\r
125 \r
126 ; DEEAR\r
127 .equ    PA6             =6\r
128 .equ    PA5             =5\r
129 .equ    PA4             =4\r
130 .equ    PA3             =3\r
131 .equ    PA2             =2\r
132 .equ    PA1             =1\r
133 .equ    PA0             =0\r
134 \r
135 ; DEEDR\r
136 .equ    ED7             =7\r
137 .equ    ED6             =6\r
138 .equ    ED5             =5\r
139 .equ    ED4             =4\r
140 .equ    ED3             =3\r
141 .equ    ED2             =2\r
142 .equ    ED1             =1\r
143 .equ    ED0             =0\r
144 \r
145 ; DEECR\r
146 .equ    BSY             =3\r
147 .equ    EEU             =2\r
148 .equ    EEL             =1\r
149 .equ    EER             =0\r
150 \r
151 ; LOCKDET2\r
152 .equ    EUD             =7\r
153 .equ    LAT             =6\r
154 .equ    ULC2    =5\r
155 .equ    ULC1    =4\r
156 .equ    ULC0    =3\r
157 .equ    LC2             =2\r
158 .equ    LC1             =1\r
159 .equ    LC0             =0\r
160 \r
161 ; VCOTUNE\r
162 .equ    VCOVDET1        =7\r
163 .equ    VCOVDET0        =6\r
164 .equ    VCOTUNE4        =4\r
165 .equ    VCOTUNE3        =3\r
166 .equ    VCOTUNE2        =2\r
167 .equ    VCOTUNE1        =1\r
168 .equ    VCOTUNE0        =0\r
169 \r
170 ; PWR_ATTEN\r
171 .equ    PCC2    =5\r
172 .equ    PCC1    =4\r
173 .equ    PCC0    =3\r
174 .equ    PCF2    =2\r
175 .equ    PCF1    =1\r
176 .equ    PCF0    =0\r
177 \r
178 ; TX_CNTL\r
179 .equ    FSK             =6\r
180 .equ    TXE             =5\r
181 .equ    TXK             =4\r
182 .equ    LOC             =2\r
183 \r
184 ; LOCKDET1\r
185 .equ    UPOK    =4\r
186 .equ    ENKO    =3\r
187 .equ    BOD             =2\r
188 .equ    CS1             =1\r
189 .equ    CS0             =0\r
190 \r
191 ;****************************************************************************************\r
192 ;* Define global registers\r
193 ;****************************************************************************************\r
194 \r
195 .def         XL      =R26   \r
196 .def         XH      =R27   \r
197 .def         YL      =R28   \r
198 .def         YH      =R29   \r
199 .def         ZL      =R30   \r
200 .def         ZH      =R31   \r