2000 Jul 26
107
Philips Semiconductors
Preliminary Specification
Single-chip 8-bit microcontroller with CAN controller
P8xC591
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
! STATE : 28, DATA of S1DAT have been transmitted, ACK received.
! ACTION : If Transmitted DATA is last DATA then transmit a STOP condition, else transmit next DATA.
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
.sect
mts28
.base
0x128
djnz
NUMBYTMST,NOTLDAT1
mov
S1CON,#ENS1_NOTSTA_STO_NOTSI_AA_CR0
0128
012B
D55285
75D8D5
! JMP if NOT last DATA
! clr SI, set AA
012E
01B9
ajmp
RETmt
.sect
.base
NOTLDAT1:
mts28sb
0x0b0
00B0
00B3
00B5
75D018
87DA
75D8C5
mov
mov
mov
psw,#SELRB3
S1DAT,@r1
S1CON,#ENS1_NOTSTA_NOTSTO_NOTSI_AA_CR0
CON:
! clr SI, set AA
00B8
00B9
00BB
09
D0D0
32
inc
pop
reti
r1
psw
RETmt :
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
! STATE : 30, DATA of S1DAT have been transmitted, NOT ACK received.
! ACTION : Transmit a STOP condition.
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
.sect
mts30
.base
0x130
mov
S1CON,#ENS1_NOTSTA_STO_NOTSI_AA_CR0
0130
75D8D5
! set STO, clr SI
0133
0135
D0D0
32
pop
reti!
psw
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
! STATE : 38, Arbitration lost in SLA+W or DATA.
! ACTION : Bus is released, not addressed SLV mode is entered. A new START condition is
!
transmitted when the IIC bus is free again.!
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
.sect
mts38
.base
0x138
mov
S1CON,#ENS1_STA_NOTSTO_NOTSI_AA_CR0
mov
NUMBYTMST,BACKUP
ajmp
RETmt
0138
013B
013E
75D8E5
855352
01B9
!*****************************************************************************************************************************
! MASTER RECEIVER STATE SERVICE ROUTINES
!*****************************************************************************************************************************
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
! STATE : 40, Previous state was STATE 08 or STATE 10, SLA+R have been transmitted, ACK received.
! ACTION : DATA will be received, ACK returned.
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
.sect
mts40
.base
0x140
mov
S1CON,#ENS1_NOTSTA_NOTSTO_NOTSI_AA_CR0
0140
75D8C5
! clr STA, STO, SI set AA
0143
D0D0
32
pop
reti
psw
LOC
OBJ
SOURCE