AN1212 Freescale Semiconductor / Motorola, AN1212 Datasheet - Page 31

no-image

AN1212

Manufacturer Part Number
AN1212
Description
J1850 Multiplex Bus Communication Using the MC68HC705C8 and the SC371016 J1850 Communications Interface (JCI)
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
0000
0180
0180
0183
0185
0187
0189
018B
018D
018F
0191
0193
0195
0197
0199
019B
019E
019F
01A1
01A3
01A4
01A6
01A7
MOTOROLA
CD01AE
3F70
1F42
A603
B737
A673
B738
A655
B739
B670
B73A
A604
B736
CD01FE
9D
AE3F
A6FF
4A
26FD
5A
26F8
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
************************************************************************
*
*
*
*
* This sample program transmits a message consisting of pri/type=$03,
* target address $73, source address $55, and a data byte, beginning
* with $00. After a delay of 50ms, the data byte is incremented, and
* the message is retransmitted. Anytime a message is received, it
* will be stored in one of the Received Message Buffers, which have
* been reserved for target addresses: $00, $20, $04 & $24 (see
* equates). The Acceptance Mask Register is loaded with $D1, and the
* Acceptance Code Register is loaded with $26. This prevents the
* messages transmitted by the JCI from being received by the JCI,
* and passed back to the host MCU.
*
************************************************************************
vardata
doover:
lp1:
lpo:
J1850 Multiplex Bus Communication Using the MC68HC705C8
and the SC371016 J1850 Communications Interface (JCI)
Freescale Semiconductor, Inc.
For More Information On This Product,
equ
org
jsr
clr
bclr txt,txcntrl
lda
sta
lda
sta
lda
sta
lda
sta
lda
sta
jsr
nop
ldx
lda
deca
bne
decx
bne
$70
rom
JCIRST
vardata
#$03
txbuf
#$73
txbuf+1
#$55
txbuf+2
vardata
txbuf+3
#04
txcount
TRANSMIT
#$3f
#$ff
lpo
lpl
Go to: www.freescale.com
MC68HC705C8/JCI Driver Code
Example Program
;Initialize variable data storage location
;Initialize the MC68HC705C8, and reset
;and initialize the JCI for MUX bus
;communication
;Clear the location where the variable
;data byte is stored
;Clear the "Message to Tx" bit to
;prevent an incomplete message from
;being transmitted onto the MUX bus
;Load the pri/type byte into
;RAM location"txbuf"
;Load the target address byte
;into RAM location "txbuf"+1
;Load the source address byte
;into RAM location "txbuf"+2
;Load the variable data byte
;into RAM location "txbuf"+3
;Load the number bytes in the
;message into RAM location "txcount"
;Call the subroutine TRANSMIT,
;initiating the transmit sequence
;Delay loop . . .
;End delay loop.
Code Listings
AN1212/D
31
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*

Related parts for AN1212