2000 Jul 26
104
Philips Semiconductors
Preliminary Specification
Single-chip 8-bit microcontroller with CAN controller
P8xC591
!*****************************************************************************************************************************
! LOCATIONS IN DATA RAM
!*****************************************************************************************************************************
MTD
-0x30
MRD
-0x38
SRD
-0x40
STD
-0x48
0030
0038
0040
0048
! MST/TRX/DATA base address
! MST/REC/DATA base address
! SLV/REC/DATA base address
! SLV/TRX/DATA base address
0053
BACKUP
-0x53
! Backup from NUMBYTMST
! To restore NUMBYTMST in case
! of an Arbitration Loss.
! Number of bytes to transmit
! or receive as MST.
! Contains SLA+R/W to be
! transmitted.
! High Address byte for STATE 0f
! till STATE 25.
0052
NUMBYTMST
-0x52
0051
SLA
-0x51
0050
HADD
-0x50
!*****************************************************************************************************************************
! INITIALIZATION ROUTINE
! Example to initialize IIC Interface as slave receiver or slave transmitter and start a MASTER TRANSMIT
! or a MASTER RECEIVE function. 4 bytes will be transmitted or received.
!*****************************************************************************************************************************
.sect
strt
.base
0x00
ajmp
INIT
.sect
initial
.base
0x200
INIT:
mov
S1ADR,#OWNSLA
0000
4100
! RESET
0200
75DB31
! Load own SLA + enable
! general call recognition
! P1.6 High level.
! P1.7 High level.
0203
0205
0207
020A
020D
020F
D296
D297
755001
43A8A0
C2BD
75D8C5
setb
setb
mov
orl
clr
mov
P1(6)
P1(7)
HADD,#PAG1
IEN0,#ENSI01
SI01HP
S1CON, #ENS1_NOTSTA_NOTSTO_NOTSI_AA_CR0
! Enable SI01 interrupt
! SI01 interrupt low priority
! Initialize SLV funct.
!*****************************************************************************************************************************
! START MASTER TRANSMIT FUNCTION
!*****************************************************************************************************************************
mov
NUMBYTMST,#0x4
mov
SLA,#SLAW
setb
STA
0212
0215
0218
755204
7551C0
D2DD
! Transmit 4 bytes.
! SLA+W, Transmit funct.
! set STA in S1CON!
!*****************************************************************************************************************************
! START MASTER RECEIVE FUNCTION
!*****************************************************************************************************************************
mov
NUMBYTMST,#0x4
mov
SLA,#SLAR
setb
STA
021A
021D
0220
755204
7551C1
D2DD
! Receive 4 bytes.
! SLA+R, Receive funct.
! set STA in S1CON
LOC
OBJ
SOURCE