Vous êtes sur la page 1sur 14

Serial Communication in 8051

1/19/2016

MPMC

INTRODUCTION

1/19/2016

MPMC

BASICS OF SERIAL COMMUNICATION

1/19/2016

MPMC

Serial data communication uses two methods


Synchronous method transfers a block of data at a time
Asynchronous method transfers a single byte at a time
There are special IC chips made by many manufacturers
for serial communications
UART (universal asynchronous Receiver-transmitter)
USART (universal synchronous-asynchronous
Receiver-transmitter)

1/19/2016

MPMC

Data Transmission Mechanisms

1/19/2016

MPMC

Serial Communication

1/19/2016

MPMC

RS232 Standards
An interfacing standard RS232 was set by the Electronics
Industries Association(EIA) in 1960
In RS232, a 1 is represented by -3 ~ -25 V, while a 0 bit is +3 ~
+25 V, making -3 to +3 undefined
IBM introduced the DB-9 version of the serial I/O standard

1/19/2016

MPMC

1/19/2016

MPMC

1/19/2016

MPMC

8051 has two pins that are used specifically for transferring and
receiving data serially. These two pins are called TxD and RxD and
are part of the port 3 group (P3.0 and P3.1) These pins are TTL
compatible; therefore, they require a line driver to make them
RS232 compatible.
A line driver such as the MAX232 chip is required to convert RS232
voltage levels to TTL levels, and vice versa

1/19/2016

MPMC

10

8051 UART

1/19/2016

MPMC

11

SBUF Register
Serial Buffer
8-bit Register
Transmission of Data
Load value into SBUF Register
Framed and Sent via TxD Line (P3.1)
Reception of Data
Serially received data via RxD Line(P3.0)
Deframed and placed in SBUF

1/19/2016

MPMC

12

1/19/2016

MPMC

13

1/19/2016

MPMC

14

Vous aimerez peut-être aussi