| công cụ tìm kiếm bảng dữ liệu linh kiện điện tử |
|
HT48CU80 bảng dữ liệu(PDF) 23 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT48CU80 bảng dữ liệu(HTML) 23 Page - Holtek Semiconductor Inc |
|
23 / 54 page ![]() HT48RU80/HT48CU80 Rev. 1.00 23 April 12, 2006 Only the RXR register is mapped onto the MCU Data Memory, the Receiver Shift Register is not mapped and is therefore inaccessible to the application pro- gram. It should be noted that the actual register for data transmission and reception, although referred to in the text, and in application programs, as separate TXR and RXR registers, only exists as a single shared reg- ister in the Data Memory. This shared register known as the TXR/RXR register is used for both data trans- mission and data reception. · UART status and control registers There are five control registers associated with the UART function. The USR, UCR1 and UCR2 registers control the overall function of the UART, while the BRG register controls the Baud rate. The actual data to be transmitted and received on the serial interface is managed through the TXR/RXR data registers. · USR register The USR register is the status register for the UART, which can be read by the program to determine the present status of the UART. All flags within the USR register are read only. Further explanation on each of the flags is given below: ¨ TXIF The TXIF flag is the transmit data register empty flag. When this read only flag is ²0² it indicates that the character is not transferred to the transmit shift registers. When the flag is ²1² it indicates that the transmit shift register has received a character from the TXR data register. The TXIF flag is cleared by reading the UART status register (USR) with TXIF set and then writing to the TXR data register. Note that when the TXEN bit is set, the TXIF flag bit will also be set since the transmit buffer is not yet full. ¨ TIDLE The TIDLE flag is known as the transmission com- plete flag. When this read only flag is ²0² it indicates that a transmission is in progress. This flag will be set to ²1² when the TXIF flag is ²1² and when there is no transmit data, or break character being trans- mitted. When TIDLE is ²1² the TX pin becomes idle. The TIDLE flag is cleared by reading the USR regis- ter with TIDLE set and then writing to the TXR regis- ter. The flag is not generated when a data character, or a break is queued and ready to be sent. ¨ RXIF The RXIF flag is the receive register status flag. When this read only flag is ²0² it indicates that the RXR read data register is empty. When the flag is ²1² it indicates that the RXR read data register con- tains new data. When the contents of the shift regis- ter are transferred to the RXR register, an interrupt is generated if RIE=1 in the UCR2 register. If one or more errors are detected in the received word, the appropriate receive-related flags NF, FERR, and/or PERR are set within the same clock cycle. The RXIF flag is cleared when the USR register is read with RXIF set, followed by a read from the RXR reg- ister, and if the RXR register has no data available. ¨ RIDLE The RIDLE flag is the receiver status flag. When this read only flag is ²0² it indicates that the receiver is between the initial detection of the start bit and the completion of the stop bit. When the flag is ²1² it indicates that the receiver is idle. Between the com- pletion of the stop bit and the detection of the next start bit, the RIDLE bit is ²1² indicating that the UART is idle. ¨ OERR The OERR flag is the overrun error flag, which indi- cates when the receiver buffer has overflowed. When this read only flag is ²0² there is no overrun er- ror. When the flag is ²1² an overrun error occurs which will inhibit further transfers to the RXR receive data register. The flag is cleared by a software se- quence, which is a read to the status register USR followed by an access to the RXR data register. ¨ FERR The FERR flag is the framing error flag. When this read only flag is ²0² it indicates no framing error. When the flag is ²1² it indicates that a framing error has been detected for the current character. The flag can also be cleared by a software sequence which will involve a read to the USR status register followed by an access to the RXR data register. T X R R e g i s t e r R X R R e g i s t e r M S B L S B T r a n s m i t t e r S h i f t R e g i s t e r T X P i n M S B L S B R e c e i v e r S h i f t R e g i s t e r R X P i n B a u d R a t e G e n e r a t o r C L K C L K B u f f e r M C U D a t a B u s UART Data Transfer Scheme |
|
Link URL |
| Cho đến nay ALLDATASHEET có giúp ích cho doanh nghiệp của bạn hay không? [ DONATE ] |
Alldatasheet là | Quảng cáo | Liên lạc với chúng tôi | Chính sách bảo mật | Liên kết đến bảng dữ liệu | Trao đổi link | Tìm kiếm theo nhà sản xuất 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 |