1 / 9

USART 8051

USART 8051. Prof Afonso Ferreira Miguel. Microcontrolador 8051 (MCS-51) Interface Serial. Full duplex UART. Four modes of operation: Synchronous serial I/O expansion. Asynchronous serial I/O with variable baud rate. Nine bit mode with variable baud rate. Nine bit mode with fixed baud rate.

jamuna
Download Presentation

USART 8051

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. USART 8051 Prof Afonso Ferreira Miguel

  2. Microcontrolador 8051 (MCS-51)Interface Serial • Full duplex UART. • Four modes of operation: • Synchronous serial I/O expansion. • Asynchronous serial I/O with variable baud rate. • Nine bit mode with variable baud rate. • Nine bit mode with fixed baud rate. • 10 or 11 bit frames. • Interrupt driven or polled operation. • Registers: • SCON - Serial port control register. • SBUF - Read received data. • - Write data to be transmitted. • PCON - SMOD bit.

  3. Microcontrolador 8051 (MCS-51)Interface Serial: Modos • TXD and RXD are the serial output and input pins (Port 3, bits 1 and 0). • Mode 0: Shift Register Mode. Serial data is transmitted/received on RXD. TXD outputs shift clock. Baud Rate is 1/12 of clock frequency; • Mode 1: 10-bits transmitted or received. Start (0), 8 data bits (LSB first), and a stop bit (1). Baud Rate Clock is variable using Timer 1 overflow or external count input. Can go up to 104.2KHz (20MHz osc.); • Mode 2: 11-bits transmitted or received. Start (0), 8 data bits (LSB first), programmable 9th bit, and stop bit (1). Baud Rate programmable to either 1/32 or 1/64 oscillator frequency (625KHz for 20MHz osc.); • Mode 3: 11-bit mode. 9 data bits; Baud Rate variable using Timer 1 overflow or external input. 104.2 KHz max. (20 MHz osc.).

  4. Microcontrolador 8051 (MCS-51) SCON

  5. Microcontrolador 8051 (MCS-51)

  6. Microcontrolador 8051 (MCS-51) • Configuração

  7. Microcontrolador 8051 (MCS-51) • Rotinas típicas para TX e RX um byte

  8. Microcontrolador 8051 (MCS-51) • Rotina típica para transmitir uma string

  9. Microcontrolador 8051 (MCS-51) • Utilizando a rotina anterior: • Definindo a string em memória

More Related