Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

AN1278 Datasheet(PDF) 25 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) 25 Page - STMicroelectronics

Back Button AN1278 Datasheet HTML 21Page - STMicroelectronics AN1278 Datasheet HTML 22Page - STMicroelectronics AN1278 Datasheet HTML 23Page - STMicroelectronics AN1278 Datasheet HTML 24Page - STMicroelectronics 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 Next Button
Zoom Inzoom in Zoom Outzoom out
 25 / 44 page
background image
25/44
LIN (LOCAL INTERCONNECT NETWORK) SOLUTIONS
4.1 IMPLEMENTATION ON THE ST72254G2 - SOFTWARE EMULATED SCI
4.1.1 Step by Step Configuration
lin_config.h
Setting Group
Comments
Text line in lin_config.h
CPU operating frequency
An external resonator of 16 Mhz
is used. As a result the internal
CPU frequency is 8MHz. So
“FCPU” is set to 8000000.
#define FCPU
8000000
Communication peripheral
The ST72254 has no SCI periph-
eral on chip. As a result the
UART communication has to be
emulated by one of the 16bit tim-
er TimerA or TimerB. TimerA is
chosen in this example. As a re-
sult “UART_TIMERA” is defined
and “UART_TIMERB” and “SCI”
are commented out.
#define UART_TIMERA
//#define UART_TIMERB
//#define SCI
LIN RX and LIN TX pin definition
Depending on the constraints of
the board layout and according to
the ST72254 pinout we select the
Input Capture 1 pin and the Out-
put Compare 1 pin for respective-
ly the LIN RX and LIN TX signals.
The Input Capture 1 pin of Time-
rA is linked to the Port B pin 0
(see pin description in the MCU
datasheet). As a result
LIN_RX_PINNB” is set to 0. Port
B data register has the address
0x04. As a result
“LIN_PORT_ADD” is defined to
0x04
#define UART_IC1
//#define UART_IC2
#define UART_OC1
//#define UART_OC2
#define LIN_PORT_ADD
0x04
#define LIN_RX_PINNB
0
Timeouts
The UART communication is al-
ready using one input capture
and one output compare of Time-
rA. Setting TimerA for the timeout
handling will complement the use
of the timer. So we define
“TIMEOUT_TIMERA“. Output
Compare 1 is already used by the
UART communication (see
UART_OC1) so we define the
output compare 2 for the time-
outs handling.
#define TIMEOUT_TIMERA
//#define TIMEOUT_TIMERB
//#define TIMEOUT_OC1
#define TIMEOUT_OC2
LIN baudrate
The example LIN baudrate is
9600 Baud.
#define BAUDRATE
9600



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