Beruflich Dokumente
Kultur Dokumente
Contents at a Glance
8051 Primer Board ...........................................................3 UART ...............................................................................3 RS-232 Level Converter ....................................................4 Interfacing UART .............................................................5 Interfacing UART with 8051 .............................................6 Pin Assignment with 8051 ................................................6 Circuit Diagram to Interface UART with 8051 ...................7 Source Code ....................................................................7 C Program to display a text in PC from 8051 .....................8
8051 Primer Board The 8051 Primer board is specifically designed to help students to master the required skills in the area of embedded systems. The kit is designed in such way that all the possible features of the microcontroller will be easily used by the students. The kit supports in system programming (ISP) which is done through serial port. NXPs 8051 (AT89V51RD2), 8051 Primer Kit is proposed to smooth the progress of developing and debugging of various designs encompassing of speed 8-bit Microcontrollers. UART UART (Universal Asynchronous Receiver Transmitter) are one of the basic interfaces which provide a cost effective simple and reliable communication between one controller to another controller or between a controller and PC. Join the Technical Community Today! http://www.pantechsolutions.net
RS-232 Level Converter Usually all the digital ICs work on TTL or CMOS voltage levels which cannot be used to communicate over RS-232 protocol. So a voltage or level converter is needed which can convert TTL to RS232 and RS232 to TTL voltage levels. The most commonly used RS-232 level converter is MAX232. This IC includes charge pump which can generate RS232 voltage levels (-10V and +10V) from 5V power supply. It also includes two receiver and two transmitters and is capable of full-duplex UART/USART communication. RS-232 communication enables point-to-point data transfer. It is commonly used in data acquisition applications, for the transfer of data between the microcontroller and a PC. The voltage levels of a microcontroller and PC are not directly compatible with those of RS-232, a level transition buffer such as MAX232 be used. Join the Technical Community Today! http://www.pantechsolutions.net
Interfacing UART Fig. 1 shows how to interface the UART to microcontroller. To communicate over UART or USART, we just need three basic signals which are namely, RXD (receive), TXD (transmit), GND (common ground). So to interface UART with 8051, we just need the basic signals.
Interfacing UART with 8051 We now want to display a text in PC from 8051 Primer Board by using UART module. In 8051 Primer Board contains two serial interfaces that are UART0 & UART1. Here we are using UART0. The Transmitter pins send the data into PC and the receiver pin receives the data from PC. The PC and microcontroller speed are denoted by using baud rate. When the baud rates of both PC and Microcontroller are same, then only the data transmit and receive correctly otherwise not. Pin Assignment with 8051
UART DB-9 Connector
UART0(P1)
ISP PGM
8051
UART1 (P2)
P1.2 P1.3
MAX232
Note : RXD1 and TXD1 lines are only available in Maxim-Dallas Microcontrollers DS89C4xx series.
Source Code The Interfacing UART with 8051 program is very simple and straight forward, which display a text in PC from 8051 Primer Board through UART0. Some delay is occurring when a single data is sent to PC. C programs are written in Keil software. The baud rate of microcontroller is 9600. Join the Technical Community Today! http://www.pantechsolutions.net
What do we sell?
Our products range from Various Microcontroller development boards, DSP Boards, FPGA/CPLD boards, Communication Kits, Power electronics, Basic electronics, Robotics, Sensors, Electronic components and much more . Our goal is to make finding the parts and information you need easier and affordable so you can create awesome projects and training from Basic to Cutting edge technology.