1 /*-------------------------------------------------------------------------
2 at89c55.h - register declarations for ATMEL 89x55 processors
4 Copyright (C) 1999, Bernd Bartmann <bernd.bartmann AT gmail.com>
6 Based on reg51.h by Sandeep Dutta sandeep.dutta AT usa.net
7 KEIL C compatible definitions are included
9 This library is free software; you can redistribute it and/or modify it
10 under the terms of the GNU General Public License as published by the
11 Free Software Foundation; either version 2, or (at your option) any
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
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this library; see the file COPYING. If not, write to the
21 Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
24 As a special exception, if you link this library with other files,
25 some of which are compiled with SDCC, to produce an executable,
26 this library does not by itself cause the resulting executable to
27 be covered by the GNU General Public License. This exception does
28 not however invalidate any other reasons why the executable file
29 might be covered by the GNU General Public License.
30 -------------------------------------------------------------------------*/
37 /* BYTE addressable registers */
68 /* BIT addressable registers */
159 SBIT(T2CON_0
, 0xC8, 0);
160 SBIT(T2CON_1
, 0xC8, 1);
161 SBIT(T2CON_2
, 0xC8, 2);
162 SBIT(T2CON_3
, 0xC8, 3);
163 SBIT(T2CON_4
, 0xC8, 4);
164 SBIT(T2CON_5
, 0xC8, 5);
165 SBIT(T2CON_6
, 0xC8, 6);
166 SBIT(T2CON_7
, 0xC8, 7);
168 SBIT(CP_RL2
, 0xC8, 0);
171 SBIT(EXEN2
, 0xC8, 3);
188 /* BIT definitions for bits that are not directly accessible */
233 #define T0_GATE_ 0x08
237 #define T1_GATE_ 0x80
242 #define T0_MASK_ 0x0F
243 #define T1_MASK_ 0xF0
253 /* Interrupt numbers: address = (number * 8) + 3 */
254 #define IE0_VECTOR 0 /* 0x03 external interrupt 0 */
255 #define TF0_VECTOR 1 /* 0x0b timer 0 */
256 #define IE1_VECTOR 2 /* 0x13 external interrupt 1 */
257 #define TF1_VECTOR 3 /* 0x1b timer 1 */
258 #define SI0_VECTOR 4 /* 0x23 serial port 0 */
259 #define TF2_VECTOR 5 /* 0x2B timer 2 */
260 #define EX2_VECTOR 5 /* 0x2B external interrupt 2 */