DM163005 Microchip Technology, DM163005 Datasheet - Page 60

KIT EVAL PIC16C432/433 LIN BUSS

DM163005

Manufacturer Part Number
DM163005
Description
KIT EVAL PIC16C432/433 LIN BUSS
Manufacturer
Microchip Technology
Datasheets

Specifications of DM163005

Module/board Type
Demonstration Board
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
PIC16C432, PIC16C433 LIN Bus
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
PICDEM
LinHandler
WaitStartBit
TestClear
AutoMeasureSet
AutoMeasureClr
TestSet
DS41185C-page 56
; * INPUT PARAMETER
; * OUTPUT PARAMETER
; * DESCRIPTION
; *******************************************************************************
clrf
clrf
clrf
clrf
clrf
clrf
btfsc
goto
; yes, measure first low bit time
btfss
goto
incf
goto
; Autobaud counter. The signal is sampled every 6 Instruction cycles
; This means the number of countes equals 8*Tbit/6Tcy. Example:
; Transmission rate 19.2Kbaud, Fosc=4MHz => Tbit=51us, 8*51us/6*1us = 68 counts.
; Counting the Transitions takes 9Tcy. This value has to be added to the
; number of counts. Example from above: 68 Couts + 5*9Tcy (5 because five
; transitions are counted.
incfsz
goto
incf
goto
incfsz
goto
incf
goto
btfsc
goto
incf
movf
xorlw
btfss
goto
LIN User’s Guide
; * CHANGES
;****************************************************************************
; * ROUTINE
; * AUTHOR
; * DATE LAST MODIFIED
; * REVISION
AUTOBAUD_LOW
AUTOBAUD_HIGH
AUTOHALF_LOW
AUTOHALF_HIGH
COUNTER
MESSAGE_COUNTER
GPIO, LINRX
WaitStartBit
GPIO, LINRX
AutoMeasureSet
COUNTER,f
TestSet
AUTOBAUD_LOW, f
TestClear
AUTOBAUD_HIGH,f
TestClear
AUTOBAUD_LOW, f
TestSet
AUTOBAUD_HIGH,f
TestSet
GPIO, LINRX
AutoMeasureClr
COUNTER, f
COUNTER, w
0x08
STATUS, Z
TestClear
: none
: none
: This routine sends out a LIN bus data frame and/or
ID_TEMP =holds the ID to send (parity is already gener-
DATAPOINTER =points to first data byte. Last bytes CRC
receives or transmits data. The reception or trans. of
data is defined in the ID itself. After the ID-Byte is
sent it is decoded in a look up table if data should be
transmitted or received. Depending on the result either
a transmit or receive mode is activated.
: LIN bus Transmission/Reception Routine
: Thomas Schmidt
: 08/14/2001
: 1.0
: none
; reset register
; reset register
; reset register
; reset register
; reset counter
; reset message counter register
; was start bit there
; no, keep on looking
; was there a transition from low to high?
; no, increment Autobaud counter registers
; increment counter register
; yes, therefore increment bit counter and measure
; high time
; increment Autobaud low register
; keep on testing
; increment high byte of autobaud register
; keep on testing
; increment Autobaud low register
; keep on testing
; increment high byte of autobaud register
; keep on testing
; check if pin is still high
; no, there was not, measure time
; increment counter register
; check if all 8 bits were received
;
; is result zero?
; No, therefore keep on measuring
ated
byte for transmission otherwise last byte
is data byte
 2004 Microchip Technology Inc.

Related parts for DM163005