AP29000
Connecting C166 and C500 Microcontroller to CAN
Ways of handling the SAE 81C90/91 and the CAN Module on the C167CR / C515C
Application Note
42
V 1.0, 2004-02
Extract from the include file for the SAE 81C90/91 (according to the specification
01/97):
/* Register
Addresse
*/
#define
BL1
*(unsigned char far*) 0x...00
#define
BL2
*(unsigned char far*) 0x...01
#define
OC
*(unsigned char far*) 0x...02
#define
BRPR
*(unsigned char far*) 0x...03
#define
RRR1
*(unsigned char far*) 0x...04
#define
RRR2
*(unsigned char far*) 0x...05
#define
RIMR1
*(unsigned char far*) 0x...06
#define
RIMR2
*(unsigned char far*) 0x...07
#define
TRSR1
*(unsigned char far*) 0x...08
#define
TRSR2
*(unsigned char far*) 0x...09
#define
IMSK
*(unsigned char far*) 0x...0a
#define
MOD
*(unsigned char far*) 0x...10
#define
INT
*(unsigned char far*) 0x...11
#define
CTRL
*(unsigned char far*) 0x...12
...
#define
DR0H
*(unsigned char far*) 0x...40
#define
DR0L
*(unsigned char far*) 0x...41
#define
DR1H
*(unsigned char far*) 0x...42
#define
DR1L
*(unsigned char far*) 0x...43
...
#define
BYTE0MSG0
*(unsigned char far*) 0x...80
#define
BYTE1MSG0
*(unsigned char far*) 0x...81
#define
BYTE2MSG0
*(unsigned char far*) 0x...82
#define
BYTE3MSG0
*(unsigned char far*) 0x...83
#define
BYTE4MSG0
*(unsigned char far*) 0x...84
#define
BYTE5MSG0
*(unsigned char far*) 0x...85
#define
BYTE6MSG0
*(unsigned char far*) 0x...86
#define
BYTE7MSG0
*(unsigned char far*) 0x...87
#define
BYTE0MSG1
*(unsigned char far*) 0x...88
...
The absolute addresses have to be chosen according to the address range the
controller is supposed to be located in.