Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

AN1278 Datasheet(PDF) 29 Page - STMicroelectronics

Part # AN1278
Description  Many mechanical components in the automotive sector have been replaced
PDF  44 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN1278 Datasheet(HTML) 29 Page - STMicroelectronics

Back Button AN1278 Datasheet HTML 25Page - STMicroelectronics AN1278 Datasheet HTML 26Page - STMicroelectronics AN1278 Datasheet HTML 27Page - STMicroelectronics AN1278 Datasheet HTML 28Page - STMicroelectronics AN1278 Datasheet HTML 29Page - STMicroelectronics AN1278 Datasheet HTML 30Page - STMicroelectronics AN1278 Datasheet HTML 31Page - STMicroelectronics AN1278 Datasheet HTML 32Page - STMicroelectronics AN1278 Datasheet HTML 33Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 29 / 44 page
background image
29/44
LIN (LOCAL INTERCONNECT NETWORK) SOLUTIONS
4.2.1.2 lin_ai.c
The first part of the lin_ai.c code is the definition of the LIN frames the application has to
handle. Out of the 4 defined for the whole network the application handles the 3 following
frames:
The corresponding setting of “
ID_Table” is:
const t_id_list ID_Table[]=
{
{0x03, ID_DATASENT, 2},
{0x20, ID_DATAREQUEST, 4},
{0x80, ID_DATASENT, 8}
};
The second part of the lin_ai.c code consists of 3 notification functions and is the kernel of the
LIN communication. Filling the notification functions enables you to define the behaviour of the
application upon a master data request (
DataRequest_Notification function) upon the recep-
tion of data from the master (
DataReceived_Notification function) and upon errors
(
Error_Notification function).
Timeouts
One output compare of one timer
is needed for the timeouts han-
dling. We choose the output com-
pare 1 of timer A. So
“TIMEOUT_TIMERA” and
“TIMEOUT_OC1” are defined.
#define TIMEOUT_TIMERA
//#define TIMEOUT_TIMERB
#define TIMEOUT_OC1
//#define TIMEOUT_OC2
LIN baudrate
The example LIN baudrate is
9600 Baud.
#define BAUDRATE
9600
SCI peripheral registers
See Table 8. Example of
(BRR,ExPR) values versus
baudrate and fCPU.
//#define BRR
0xC9
//#define ExPR
0x00
Number of LIN frames to be han-
dled
The network communication con-
sists of 4 LIN frames. The appli-
cation example handles 3 of
them: DataToSlave1,
RequestToSlave1 and SleepMo-
deCommand.
#define ID_TABLE_SIZE
3
Resynchronization
Not supported using the on-chip
SCI peripheral. “RESYNCH” is
commented out.
//#define RESYNCH
Frame name
Identifier ID[7..0]
Message Length
Data Direction
DataToSlave1
0x03
2
master to slave1
RequestToSlave1
0x20
4
slave1 to master
SleepModeCommand
0x80
2
master to all slaves



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com