-
Notifications
You must be signed in to change notification settings - Fork 0
/
REG_MPC82G516.INC
executable file
·273 lines (235 loc) · 5.17 KB
/
REG_MPC82G516.INC
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
;for Megawin MPC82G516
;------------------------------------------------------------------------------
;Standard SFRs
;------------------------------------------------------------------------------
;8051 Registers
P0 DATA 80H
P1 DATA 90H
P2 DATA 0A0H
P3 DATA 0B0H
PSW DATA 0D0H
ACC DATA 0E0H
B DATA 0F0H
SP DATA 81H
DPL DATA 82H
DPH DATA 83H
PCON DATA 87H
TCON DATA 88H
TMOD DATA 89H
TL0 DATA 8AH
TL1 DATA 8BH
TH0 DATA 8CH
TH1 DATA 8DH
IE DATA 0A8H
IP DATA 0B8H
SCON DATA 98H
SBUF DATA 99H
;(PSW)
CY BIT PSW.7
AC BIT PSW.6
F0 BIT PSW.5
RS1 BIT PSW.4
RS0 BIT PSW.3
OV BIT PSW.2
P BIT PSW.0
;(TCON)
TF1 BIT TCON.7
TR1 BIT TCON.6
TF0 BIT TCON.5
TR0 BIT TCON.4
IE1 BIT TCON.3
IT1 BIT TCON.2
IE0 BIT TCON.1
IT0 BIT TCON.0
;(IE)
EA BIT IE.7
ES BIT IE.4
ET1 BIT IE.3
EX1 BIT IE.2
ET0 BIT IE.1
EX0 BIT IE.0
;(IP)
PS BIT IP.4
PT1 BIT IP.3
PX1 BIT IP.2
PT0 BIT IP.1
PX0 BIT IP.0
;(SCON)
SM0 BIT SCON.7
SM1 BIT SCON.6
SM2 BIT SCON.5
REN BIT SCON.4
TB8 BIT SCON.3
RB8 BIT SCON.2
TI BIT SCON.1
RI BIT SCON.0
;(P3 alternate)
RD BIT P3.7
WR BIT P3.6
T1 BIT P3.5
T0 BIT P3.4
INT1 BIT P3.3
INT0 BIT P3.2
TXD BIT P3.1
RXD BIT P3.0
;8052 Extensions
T2CON DATA 0C8H
RCAP2L DATA 0CAH
RCAP2H DATA 0CBH
TL2 DATA 0CCH
TH2 DATA 0CDH
;(IE)
ET2 BIT IE.5
;(IP)
PT2 BIT IP.5
;(T2CON)
TF2 BIT T2CON.7
EXF2 BIT T2CON.6
RCLK BIT T2CON.5
TCLK BIT T2CON.4
EXEN2 BIT T2CON.3
TR2 BIT T2CON.2
C_T2 BIT T2CON.1
CP_RL2 BIT T2CON.0
;(P1 alternate)
T2EX BIT P1.1
T2 BIT P1.0
;------------------------------------------------------------------------------
;New-defined SFRs
;------------------------------------------------------------------------------
;MPC82G516 Extensions
AUXR DATA 8Eh
AUXR1 DATA 0A2h
SADDR DATA 0A9h
SADEN DATA 0B9h
WDTCR DATA 0E1h
PCON2 DATA 0C7h
EVRCR DATA 97h
STRETCH DATA 8Fh
AUXR2 DATA 0A6h
;for I/O
P4 DATA 0E8h
P0M0 DATA 93h
P0M1 DATA 94h
P1M0 DATA 91h
P1M1 DATA 92h
P2M0 DATA 95h
P2M1 DATA 96h
P3M0 DATA 0B1h
P3M1 DATA 0B2h
P4M0 DATA 0B3h
P4M1 DATA 0B4h
;for ISP
IFD DATA 0E2h
IFADRH DATA 0E3h
IFADRL DATA 0E4h
IFMT DATA 0E5h
SCMD DATA 0E6h
ISPCR DATA 0E7h
;for interrupt
XICON DATA 0C0h
AUXIE DATA 0ADh
IPH DATA 0B7h
AUXIP DATA 0AEh
AUXIPH DATA 0AFh
;for Timer2
T2MOD DATA 0C9h
;for UART2
S2CON DATA 0AAh
S2BRT DATA 0BAh
S2BUF DATA 9Ah
;for Keypad Interrupt
KBPATN DATA 0D5h
KBCON DATA 0D6h
KBMASK DATA 0D7h
;for ADC
ADCTL DATA 0C5h
ADCH DATA 0C6h
ADCL DATA 0BEh
ADC DATA 0C6h ;the same as ADCH: ADC result, higher 8 bits
;for PCA
CCON DATA 0D8h
CMOD DATA 0D9h
CCAPM0 DATA 0DAh
CCAPM1 DATA 0DBh
CCAPM2 DATA 0DCh
CCAPM3 DATA 0DDh
CCAPM4 DATA 0DEh
CCAPM5 DATA 0DFh
CL DATA 0E9h
CH DATA 0F9h
CCAP0L DATA 0EAh
CCAP0H DATA 0FAh
CCAP1L DATA 0EBh
CCAP1H DATA 0FBh
CCAP2L DATA 0ECh
CCAP2H DATA 0FCh
CCAP3L DATA 0EDh
CCAP3H DATA 0FDh
CCAP4L DATA 0EEh
CCAP4H DATA 0FEh
CCAP5L DATA 0EFh
CCAP5H DATA 0FFh
PCAPWM0 DATA 0F2h
PCAPWM1 DATA 0F3h
PCAPWM2 DATA 0F4h
PCAPWM3 DATA 0F5h
PCAPWM4 DATA 0F6h
PCAPWM5 DATA 0F7h
;for SPI
SPSTAT DATA 84h
SPCTL DATA 85h
SPDAT DATA 86h
;for OCD
SVAR DATA 0CEh
SBK DATA 0CFh
;(CCON)
CF BIT CCON.7
CR BIT CCON.6
CCF5 BIT CCON.5
CCF4 BIT CCON.4
CCF3 BIT CCON.3
CCF2 BIT CCON.2
CCF1 BIT CCON.1
CCF0 BIT CCON.0
;(SCON)
FE BIT SCON.7
;(XICON)
PX3 BIT XICON.7
EX3 BIT XICON.6
IE3 BIT XICON.5
IT3 BIT XICON.4
PX2 BIT XICON.3
EX2 BIT XICON.2
IE2 BIT XICON.1
IT2 BIT XICON.0
;(P1 alternate)
CEX5 BIT P1.7
CEX4 BIT P1.6
CEX3 BIT P1.5
CEX2 BIT P1.4
CEX1 BIT P1.3
CEX0 BIT P1.2
ECI BIT P1.1
SPI_CLK BIT P1.7
SPI_MISO BIT P1.6
SPI_MOSI BIT P1.5
SPI_SS BIT P1.4
S2TXD BIT P1.3
S2RXD BIT P1.2
;(P2 alternate)
KBI7 BIT P2.7
KBI6 BIT P2.6
KBI5 BIT P2.5
KBI4 BIT P2.4
KBI3 BIT P2.3
KBI2 BIT P2.2
KBI1 BIT P2.1
KBI0 BIT P2.0
;(P3 alternate)
S2CKO BIT P3.5
T0CKO BIT P3.4
;(P4 alternate)
INT3 BIT P4.2
INT2 BIT P4.3