数据搜索系统,热门电子元器件搜索
  Chinese  ▼
ALLDATASHEETCN.COM

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
标志 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


链接网址



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