| 전자부품 데이터시트 검색엔진 |
|
AN1753 데이터시트(PDF) 12 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN1753 데이터시트(HTML) 12 Page - STMicroelectronics |
|
12 / 22 page ![]() Functional software flow AN1753 12/22 DocID9986 Rev 2 6 Functional software flow The character format used is “ASCII”. Before starting a communication, you should configure the communication parameters to your requirements. You can select the baud rate, number of bits and stop bits in different combinations. However, for a correct communication, the receiver must have a reception baud rate strictly equal to the transmission baud rate of the transmitter. If not, the communication will be corrupted. So you have to configure the “Hyperterminal” correctly. To configure the device, you must set del_1bh, del_1bl, del_sampl, del_samph, STOP_BIT and TxRx_data_lnth correctly in your software. After power on, the ST7FLITE0 goes to transmit mode. It initiates the communication by transmitting character “$” in ASCII format and then goes to receive mode. The PC then receives this character on its serial port, which can be viewed in the Hyperterminal window. You then have to press a key (character) to transmit. After pressing a character key, it gets transmitted and the ST7LITE0 receives it. The ST7LITE0 then sends the same received character to the PC. This sequence can be repeated continuously (see Figure 5). 6.1 Main software routines The UART software consists of 4 main routines: • Tx_data • Rx_data • EI1_Interrupt • OPCOMP_int Tx_data: This routine is used to transmit data in bit format stored in variable “TX_byte”. It also takes care of the synchronization and of the output compare interrupt. The AT timer is initialized to the application configuration inside this routine. Rx_data: This routine is used to receive data on the input pin in bit format and stores it in “RX_byte”. To detect a start bit, it initializes the PA7 pin in interrupt mode. EI1_Interrupt: This “ei1” interrupt routine gets executed only once during receive data when PA7 receives a start (high to low edge) bit. It also initiates the AT timer for a half bit duration. OPCOMP_int: This routine gets executed in both transmit and receive modes. During a Tx_dataroutine execution, it gets executed for each data bit transfer. It is actually used to transmit data on the TxD (PA3) pin along with the start and stop bits. In receive mode, it gets executed for each data bit received, including the start and stop bits. The majority-voting system is implemented in the same section of code. |
|
|
링크 URL |
| ALLDATASHEET 가 귀하에 도움이 되셨나요? [ DONATE ] |
Alldatasheet는? | 광고문의 | 운영자에게 연락하기 | 개인정보취급방침 | 링크 투 데이터시트 | 링크교환 | 제조사별 검색 All Rights Reserved©Alldatasheet.com |
| 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 |