English
Language : 

P8XC592 Datasheet, PDF (101/108 Pages) NXP Semiconductors – 8-bit microcontroller with on-chip CAN
Philips Semiconductors
8-bit microcontroller with on-chip CAN
Product specification
P8xC592
LOC OBJ LINE SOURCE
00A0
107
00A1
108
54E0 109
C4
110
03
111
112
113
114
00A2
115
2415 116
83
117
118
119
00A5
120
00A7
121
122
123
6007 124
00A9
125
00AB
126
00AD
127
128
129
130
131
F5D8 132
75DB96 133
134
00AE
135
00AF
136
137
00B0
138
139
00
140
00
141
00A0
142
; determine the destination address in data-memory for the
; message's Data-Field
ANL
A, #ID2_0_MASK
; use ID.2 ... ID.0 only
SWAP
A
RR
A
; A = 4*ID.2 + 2*ID.1 + ID.0
; this value is used as an index for an array of 8 bytes
; containing the destination-addresses for the 8 different
; messages. Note, that the #RX_ARRAY_OFFSET is due to the
; program counter-relative access to the array.
ADD
A, #RX_ARRAY_START − RX_ARRAY_OFFSET
MOVC
A, @A + PC
RX_ARRAY_OFFSET:
; if a message passes the acceptance-filter of the CAN
; Controller, but the CPU doesn't need it, the array
; entry's value may be set to zero indicating this.
; The following <jz> instruction cares for this.
JZ
CAN_RX_READY
; now copy the Data-Field (only) from CAN- to CPU memory
; with the aid of the DMA-logic. Note, that a TX-DMA is
; performed when writing 8AH (DMA + address 10) into CANADR
; and a RX-DMA is performed when writing 94H (DMA + address 20)
; ... 9DH (DMA + address 29) into CANADR. Here address 22 is
; used to copy just the Data-Field.
MOV
CANSTA, A
; data-memory address
MOV
CANADR, #CAN_RX_DMA ; starts RX-DMA at address 22
; the DMA-transfer is done in at maximum 2 instruction cycles.
; During the transfer, neither the data-memory (RAM) nor one
; of the SFRs CANADR, CANDAT, CANCON and
; CANSTA may be accessed by the CPU.
; For simplicity, two NOPs are used here.
NOP
NOP
1996 Jun 27
101