AN1212 Freescale Semiconductor / Motorola, AN1212 Datasheet - Page 34

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
AN1212/D
020B
020C
020F
0211
0214
0216
0217
0218
0219
021B
021D
021F
0221
0223
0225
0228
022B
022D
022F
0232
0233
0235
0237
023A
023D
0240
34
9A
CD0217
1D42
CD0256
1C12
81
5F
5C
E636
B732
B336
270A
A604
B730
CD01E1
CC0218
A60C
B730
CD01E1
81
A600
B730
CD01E1
CD0256
0B3106
083103
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
clr6:
tdone:
*** Tx Message Data Transfer Subroutine ***
TXDATA:
nexttx:
lasttx:
*** Tx Status Check Subroutine ***
TXSTATUS: lda
J1850 Multiplex Bus Communication Using the MC68HC705C8
and the SC371016 J1850 Communications Interface (JCI)
Freescale Semiconductor, Inc.
For More Information On This Product,
cli
jsr
bclr txi,txcntrl
jsr
bset ocie,tcr
rts
clrx
incs
lda
sta
crz
beg
lda
sta
jsr
jmp
lda
sta
jsr
rts
sta
jsr
jsr
brclr tfifoa,status,txdone
brset tfifob,status,txdone
TXDATA
TIMERSU
txcount,x
data
txcount
lasttx
#databyte
command
TRANSFER
nexttx
#lastbyte
command
TRANSFER
#nothing
command
TRANSFER
TIMERSU
Go to: www.freescale.com
;Clear I-bit
;Jump to routine to transmit message
;data to JCI
;Clear txi bit - previous Tx not complt
;Call subroutine to setup timer int.
;Enable Output Compare Interrupt
;Return from subroutine
;Set X-register to 0
;Increment X-register
;Load message data byte into
;Data storage location
;Compare x-register with # of bytes
;If last byte, jump to last byte sequence
;Load "load as data byte" command
;into RAM location "command"
;Call TRANSFER subroutine to transfer
;data and command bytes to JCI
;Go get next byte
;Load "load as last byte" command
;into RAM location "command"
;Call TRANSFER subroutine to transfer
;last data and command byte to JCI
;Return from subroutine
;Load "do nothing" command
;into RAM location "command"
;Call TRANSFER subroutine to
;retreive current status from JCI
;Call TIMERSU subroutine to reset
;OC value for timer interrupt
;Is Tx FIFO empty?
;Has transmitter made best
;attempt to Tx message?
MOTOROLA

Related parts for AN1212