전자부품 데이터시트 검색엔진
  Korean  ▼
ALLDATASHEET.CO.KR

X  

AN1753 데이터시트(PDF) 10 Page - STMicroelectronics

부품명 AN1753
상세설명  Software UART using ST7LITE0 12-bit autoreload timer
PDF  22 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
제조업체  STMICROELECTRONICS [STMicroelectronics]
홈페이지  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN1753 데이터시트(HTML) 10 Page - STMicroelectronics

Back Button AN1753 Datasheet HTML 6Page - STMicroelectronics AN1753 Datasheet HTML 7Page - STMicroelectronics AN1753 Datasheet HTML 8Page - STMicroelectronics AN1753 Datasheet HTML 9Page - STMicroelectronics AN1753 Datasheet HTML 10Page - STMicroelectronics AN1753 Datasheet HTML 11Page - STMicroelectronics AN1753 Datasheet HTML 12Page - STMicroelectronics AN1753 Datasheet HTML 13Page - STMicroelectronics AN1753 Datasheet HTML 14Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 10 / 22 page
background image
UART implementation
AN1753
10/22
DocID9986 Rev 2
4.3
Status handling
To keep track of the status during a program execution, the software uses the “sci_status”
variable. Bits 0-4 of this variable are used to hold the system status.
Definition of each flag:
SP: Reception mode sampling phase
BR: Byte Received flag
RE: Reception Enable
BS: Byte Sent flag
TE: Transmission Enable
4.4
Transmit and receive implementation
The transmission mode gets executed after power on. To transmit data, the program uses
port pin PA3 in output mode with the “Output Compare” interrupt. One bit is transmitted
during each interrupt, generated after a bit delay when the 12-bit upcounter (CNTR) reaches
the value (=1 bit delay) stored in the DCR0H and DCR0L registers. For a duty cycle register
(DCR0L/DCR0H), the value depends on the required baud rate and clock frequency.
For receive mode, the program uses port pin PA7 in input mode along with its interrupt and
output compare functions. To sense the start bit, the “ei1” interrupt is used and configured as
“Falling edge only”. In this interrupt routine, the program sets the ATR - the output compare
value for a half bit delay(a) - and disables the “ei1” interrupt to use PA7 in normal input
mode, in order to receive the entire frame. This half bit delay is used to sample a bit in the
middle of it. After receiving a start bit in an output compare interrupt, the same interrupt
routine gets executed each time a bit must be received. To receive each bit correctly, the
majority-voting system is implemented in this interrupt routine.
The interrupt strategy used in the software to transmit and receive allows other applications
to work at the same time.
Note:
Error handling: This program does not handle communication errors (e.g. Frame Errors).
No handshaking is implemented.
For better performance at high baud rates, it is recommended to use character transmission
rather than string transmission.
SP
BR
RE
BS
TE
a.
The user can adjust this value depending on the baud rate.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22


데이터시트 다운로드

Go To PDF Page


링크 URL



ALLDATASHEET 가 귀하에 도움이 되셨나요?  [ DONATE ] 

Alldatasheet는?   |   광고문의   |   운영자에게 연락하기   |   개인정보취급방침   |   링크 투 데이터시트    |   링크교환   |   제조사별 검색
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