AN2633 Freescale Semiconductor / Motorola, AN2633 Datasheet - Page 28

no-image

AN2633

Manufacturer Part Number
AN2633
Description
LIN Drivers for SLIC Module on the MC68HC908QL4
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
AN2633/D
MyData:
MyCode:
;/+-----------------------------------------------------------------------------+
;/|
;/|
;/|
;/|
;/|
;/|
;/|
;/+-----------------------------------------------------------------------------+
slic_init:
wait:
;/+-----------------------------------------------------------------------------+
;/|
;/|
;/|
;/|
;/|
;/+-----------------------------------------------------------------------------+
slic_isr:
jmptab: jmp serve0x00
28
lda
coma
and
sta
lda
and
cmp
bne
lda
sta
lda
ora
sta
rts
SLIC_Init - Initializes SLIC module
Configures SLIC for:
SLIC_ISR - Interrupt Service Routine
Main handler for SLIC interrupts
pshh
clrh
ldx SLCSV
jmp jmptab,x
nop
1. LIN or BTM mode operation
2. Clock Operation in MCU Wait Mode
3. Receive filter prescaler adjustment for data rate
4. Bit timing setting (BTM mode)
Include 'QL4_registers_v0r2.inc'
XDEF slic_isr
XDEF slic_init
SECTION
XREF LINdata
XREF LINID
XREF BusOff
XREF LINSleep
SECTION
#mINITREQ
SLCC1
SLCC1
#mINITACK
SLCS
#0
wait
#$80
SLCP
SLCC2
#mSLCE
SLCC2
SHORT
LIN Drivers for SLIC Module on the MC68HC908QL4
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
; Push H onto stack
; Clear H to ensure proper addressing
; Load SLCSV value into index register
; SLCSV used as offset into jump table
; No interrupts pending
;
; Invert mask
; AND with SLCC1
; Wait for INITACK to clear
;
; See if INITACK set
; Branch if INITACK still set
;
; Set filter prescaler
;
; Enable SLIC module
; MC68HC908QL4
; Routine to initialize the SLIC
; Global varibles use XREF
|
|
|
|
|
|
|
|
|
|
|
|
MOTOROLA

Related parts for AN2633