2000 Jul 26
105
Philips Semiconductors
Preliminary Specification
Single-chip 8-bit microcontroller with CAN controller
P8xC591
!*****************************************************************************************************************************
! SI01 INTERRUPT ROUTINE
!*****************************************************************************************************************************
.sect
intvec
.base
0x00
! SI01 interrupt vector
! S1STA and HADD are pushed onto the stack.
! They serve as return address for the RET instruction.
! The RET instruction sets the Program Counter to address HADD,
! S1STA and jumps to the right subroutine.
002B
002D
002F
0031
C0D0
C0D9
C050
22
push
push
push
ret
psw
S1STA
HADD
! save psw
! JMP to address HADD,S1STA.
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
! STATE : 00, Bus error.
! ACTION : Enter not addressed SLV mode and release bus. STO reset.
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
.sect
st0
.base
0x100
mov
S1CON,#ENS1_NOTSTA_STO_NOTSI_AA_CR0
0100
75D8D5
! clr SI
! set STO,AA
0103
0105
D0D0
32
pop
reti
psw
!*****************************************************************************************************************************
! MASTER STATE SERVICE ROUTINES
!*****************************************************************************************************************************
!*****************************************************************************************************************************
! State 08 and State 10 are both for MST/TRX and MST/REC.
! The R/W bit decides whether the next state is within
! MST/TRX mode or within MST/REC mode.
!*****************************************************************************************************************************
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
! STATE : 08, A, START condition has been transmitted.
! ACTION : SLA+R/W are transmitted, ACK bit is received.!
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
.sect
mts8
.base
0x108
mov
S1DAT,SLA
mov
S1CON,#ENS1_NOTSTA_NOTSTO_NOTSI_AA_CR0
0108
010B
8551DA
75D8C5
! Load SLA+R/W
! clr SI
010E
01A0
ajmp
INITBASE1
LOC
OBJ
SOURCE