Freescale Semiconductor Microcontrollers User Manual

Page 283

Advertising
background image

HC08 Full Chip Simulation

Configuration Procedure

283

Microcontrollers Debugger Manual

lda 1,x ; get next byte in message address
and #$03
lsla
ora CT2IDR1
sta CT2IDR1
lda 2,x ; get next byte in message address
and #$80
rola
rola
ora CT2IDR1
sta CT2IDR1
lda 2,x ; get next byte in message address
and #$7F
lsla
sta CT2IDR2
lda 3,x ; get next byte in message address
and #$80
rola
rola
ora CT2IDR2
sta CT2IDR2
lda 3,x ; get next byte in message address
and #$7F
lsla
sta CT2IDR3
lda 4,x ; get the message priority
sta CT2TBPR
lda 5,x ; get the message length
sta CT2DLR
sta datacount
lda 6,x ; get the message data
sta CT2DSR0
lda 7,x ; get the message data
sta CT2DSR1
SYNCHCAN:
lda #$00
sta CMCR0 ; allow MSCAN08 to synchronize to the bus
lda #$FF
sta CRFLG ; Reset all CAN receiver flags
lda #01
sta CRIER ; enable receiver full interrupt
lda #$07
sta CTFLG ; Reset all CAN transmitter flags
rts

****************************************************************
* MAIN_INIT - This is the point where code starts executing *

Advertising