1 /*-------------------------------------------------------------------------
2 Register Declarations for SIEMENS/INFINEON SAB 80515 Processor
4 Written By - Bela Torok
6 based on reg51.h by Sandeep Dutta sandeep.dutta@usa.net
7 KEIL C compatible definitions are included
9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Lesser General Public
11 License as published by the Free Software Foundation; either
12 version 2.1 of the License, or (at your option) any later version.
14 This library is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Lesser General Public License for more details.
19 You should have received a copy of the GNU Lesser General Public
20 License along with this library; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 In other words, you are welcome to use, share and improve this program.
24 You are forbidden to forbid anyone else to use, share and improve
25 what you give them. Help stamp out software-hoarding!
26 -------------------------------------------------------------------------*/
31 /* BYTE addressable registers */
48 sfr at 0xA8 IEN0 ; /* as called by Siemens */
49 sfr at 0xA9 IP0 ; /* interrupt priority register - SAB80515 specific */
51 sfr at 0xB8 IEN1 ; /* interrupt enable register - SAB80515 specific */
52 sfr at 0xB9 IP1 ; /* interrupt priority register as called by Siemens */
53 sfr at 0xC0 IRCON ; /* interrupt control register - SAB80515 specific */
54 sfr at 0xC1 CCEN ; /* compare/capture enable register */
55 sfr at 0xC2 CCL1 ; /* compare/capture register 1, low byte */
56 sfr at 0xC3 CCH1 ; /* compare/capture register 1, high byte */
57 sfr at 0xC4 CCL2 ; /* compare/capture register 2, low byte */
58 sfr at 0xC5 CCH2 ; /* compare/capture register 2, high byte */
59 sfr at 0xC6 CCL3 ; /* compare/capture register 3, low byte */
60 sfr at 0xC7 CCH3 ; /* compare/capture register 3, high byte */
62 sfr at 0xCA CRCL ; /* compare/reload/capture register, low byte */
63 sfr at 0xCB CRCH ; /* compare/reload/capture register, high byte */
67 sfr at 0xD8 ADCON ; /* A/D-converter control register */
68 sfr at 0xD9 ADDAT ; /* A/D-converter data register */
69 sfr at 0xDA DAPR ; /* D/A-converter program register */
70 sfr at 0xDB P6 ; /* Port 6 - SAB80515 specific */
73 sfr at 0xE8 P4 ; /* Port 4 - SAB80515 specific */
75 sfr at 0xF8 P5 ; /* Port 5 - SAB80515 specific */
78 /* BIT addressable registers */
109 sbit at 0x90 INT3_CC0 ; /* P1 alternate functions - SAB80515 specific */
110 sbit at 0x91 INT4_CC1 ;
111 sbit at 0x92 INT5_CC2 ;
112 sbit at 0x93 INT6_CC3 ;
115 sbit at 0x96 CLKOUT ;
145 sbit at 0xAE WDT ; /* watchdog timer reset - SAB80515 specific */
148 sbit at 0xAF EAL ; /* EA as called by Siemens */
170 sbit at 0xB8 EADC ; /* A/D converter interrupt enable */
176 sbit at 0xBE SWDT ; /* watchdog timer start/reset */
177 sbit at 0xBF EXEN2 ; /* timer2 external reload interrupt enable */
180 sbit at 0xC0 IADC ; /* A/D converter irq flag */
181 sbit at 0xC1 IEX2 ; /* external interrupt edge detect flag */
186 sbit at 0xC6 TF2 ; /* timer 2 owerflow flag */
187 sbit at 0xC7 EXF2 ; /* timer2 reload flag */
190 sbit at 0xC8 T2CON_0 ;
191 sbit at 0xC9 T2CON_1 ;
192 sbit at 0xCA T2CON_2 ;
193 sbit at 0xCB T2CON_3 ;
194 sbit at 0xCC T2CON_4 ;
195 sbit at 0xCD T2CON_5 ;
196 sbit at 0xCE T2CON_6 ;
197 sbit at 0xCF T2CON_7 ;
232 sbit at 0xA0 AREG_F0 ;
233 sbit at 0xA1 AREG_F1 ;
234 sbit at 0xA2 AREG_F2 ;
235 sbit at 0xA3 AREG_F3 ;
236 sbit at 0xA4 AREG_F4 ;
237 sbit at 0xA5 AREG_F5 ;
238 sbit at 0xA6 AREG_F6 ;
239 sbit at 0xA7 AREG_F7 ;
252 sbit at 0xF0 BREG_F0 ;
253 sbit at 0xF1 BREG_F1 ;
254 sbit at 0xF2 BREG_F2 ;
255 sbit at 0xF3 BREG_F3 ;
256 sbit at 0xF4 BREG_F4 ;
257 sbit at 0xF5 BREG_F5 ;
258 sbit at 0xF6 BREG_F6 ;
259 sbit at 0xF7 BREG_F7 ;
271 /* BIT definitions for bits that are not directly accessible */
316 #define T0_GATE_ 0x08
320 #define T1_GATE_ 0x80
325 #define T0_MASK_ 0x0F
326 #define T1_MASK_ 0xF0
336 #define WMCON_WDTEN 0x01
337 #define WMCON_WDTRST 0x02
338 #define WMCON_DPS 0x04
339 #define WMCON_EEMEN 0x08
340 #define WMCON_EEMWE 0x10
341 #define WMCON_PS0 0x20
342 #define WMCON_PS1 0x40
343 #define WMCON_PS2 0x80
346 #define SPCR_SPR0 0x01
347 #define SPCR_SPR1 0x02
348 #define SPCR_CPHA 0x04
349 #define SPCR_CPOL 0x08
350 #define SPCR_MSTR 0x10
351 #define SPCR_DORD 0x20
352 #define SPCR_SPE 0x40
353 #define SPCR_SPIE 0x80
356 #define SPSR_WCOL 0x40
357 #define SPSR_SPIF 0x80
360 #define SPDR_SPD0 0x10
361 #define SPDR_SPD1 0x20
362 #define SPDR_SPD2 0x40
363 #define SPDR_SPD3 0x80
364 #define SPDR_SPD4 0x10
365 #define SPDR_SPD5 0x20
366 #define SPDR_SPD6 0x40
367 #define SPDR_SPD7 0x80
369 /* Interrupt numbers: address = (number * 8) + 3 */
370 #define IE0_VECTOR 0 /* 0x03 external interrupt 0 */
371 #define TF0_VECTOR 1 /* 0x0b timer 0 */
372 #define IE1_VECTOR 2 /* 0x13 external interrupt 1 */
373 #define TF1_VECTOR 3 /* 0x1b timer 1 */
374 #define SI0_VECTOR 4 /* 0x23 serial port 0 */
375 #define TF2_VECTOR 5 /* 0x2B timer 2 */
376 #define EX2_VECTOR 5 /* 0x2B external interrupt 2 */
378 #define IADC_VECTOR 8 /* 0x43 A/D converter interrupt */
379 #define IEX2_VECTOR 9 /* 0x4B external interrupt 2 */
380 #define IEX3_VECTOR 10 /* 0x53 external interrupt 3 */
381 #define IEX4_VECTOR 11 /* 0x5B external interrupt 4 */
382 #define IEX5_VECTOR 12 /* 0x63 external interrupt 5 */
383 #define IEX6_VECTOR 13 /* 0x6B external interrupt 6 */