| Electronic Components Datasheet Search |
|
ATPL00B Datasheet(PDF) 58 Page - ATMEL Corporation |
|
|
|||||||||||||||||||||||||||||
ATPL00B Datasheet(HTML) 58 Page - ATMEL Corporation |
|
58 / 152 page ![]() Atmel ATPL00B [datasheet] 43028A-ATPL - 9/12 58 6. Standard Serial Interfaces The serial ports are full duplex; they can transmit and receive simultaneously. The serial port reception and transmission registers are both accessed at Special Function Register SBUF(0,1,2). Writing to SBUF loads the transmit register and starts transmission, while reading SBUF accesses a physically separate receive register. The reception register is buffered and it can start reception of a second byte before a previously received byte has been read from the register. When a second byte is fully received the first one is lost. The serial port control and status register is the Special Function Register SCON(0,1,2). This register contains the mode selection bits, the 9th data bit for transmit and receive (TB8 and RB8), and the serial port interrupt bits (TI and RI). Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 B it 0 SCON SM0 SM1 SM2 REN TB8 RB8 TI RI SM(0:1): “00”: Mode 0: Shift register mode; baud rate=1/12 fclk “01”: Mode 1: 8-bit UART mode; baud rate= T1 overflow “10”: Mode 2: 9-bit UART mode; baud rate= 1/32 or 1/64 fclk “11”: Mode 3: 9-bit UART mode; baud rate= T1 overflow SM2: Reception control. In modes 2 and 3 with SM2=‟1‟, RI will be „0‟ if the 9 th received bit is „0‟; In mode 1 with SM2=‟1‟, RI will be „0‟ if the received stop bit is not correct; In mode 0 SM2 keeps a „0‟. REN: Serial port reception enable TB8: 9 th transmitted bit in modes 2 and 3 RB8: 9 th received bit in modes 2 and 3, received stop bit in mode 1 when SM2=‟0‟ TI: Transmission interrupt flag. Set by hardware at the end of transmission, must be cleared by software RI: Reception interrupt flag. Set by hardware at the end of transmission, must be cleared by software The serial port can operate in 4 modes. Transmission is always initiated by any instruction that writes SBUF, and TI flag is set after transmission. Reception is initiated in Mode 0 by the condition RI=0 and REN=1, and in the other modes by the incoming start bit if REN=1. In Modes 2 and 3, 9 data bits are received. The 9 th one goes into RB8 and then comes a stop bit. The port can be programmed such that when the stop bit is received, the serial port interrupt will be activated only if RB8 = 1. This feature is enabled by setting bit SM2 in SCON. 6.1 Serial Port modes 6.1.1 Mode 0 (shift register mode) Serial data inputs and exits through RxD. TxD outputs the shift clock. Eight bits are transmitted/received (LSB first). The baud rate is fixed at 1/12 the oscillator frequency. The internal timing is such that four full machine cycles will elapse between “write to SBUF” command and activating the transmission; transmission ends in the 36th machine cycle after “write to SBUF”. Reception is initiated by the conditions REN = 1 and RI = 0, and after 36 machine cycles reception finish and RI is set to „1‟. |
|
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 |
| 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 |