You are on page 1of 18

COMPUTER COMMUNICATION

PROGRAMMING USING C# VIA SERIAL


PORT WITH MICROCONTROLLER 8051
Lecturer: Ph.D Pham Van Khoa
• Phan Minh Nhật 20119147

• Trần Tuấn Kiệt 20119009

• Phạm Trung Hiếu 20119001

• Ngô Ngọc Duy 20119120


TABLE OF CONTENTS

1. Introduction

2. Serial communication with UART

3. Circuit design

4. Simulation

5. Conclusion
Introduction

The 8051 is the first microcontroller of the MCS-51 family developed by


Intel Corporation in 1980
Introduction
Introduction
Introduction
8051 has four Input/output port P0, P1, P2, P3
Each port is 8 bit wide and their SFR (P0, P1, P2, P3) are bit
accessible i.e. we can set or reset individual bit.
P0 I/O pins are multiplexed with an 8-bit data bus and lower
order address bus (AD0-AD7) which de-multiplexed by ALE
signal and latch used in external memory access operation.
P2 I/O pins are multiplexed with remaining higher order address
bus (A8-A15)
P3 I/O pins also have dual functions as,
P3.0 – RXD – Serial data receive.
P3.1 – TXD – Serial data transmit.
P3.2 – INT0 – External Interrupt 0.
P3.3 – INT1 – External Interrupt 1.
P3.4 – T0 – Clock input for counter 0.
P3.5 – T1 – Clock input for counter 1.
P3.6 – WR – Signal for writing to external memory.
P3.7 – RD – Signal for reading from external memory.
P0 and P2 can’t be used as I/O pins in the external memory
access operation.
Introduction

Types of interrupt in 8051 Microcontroller

•Timer 0 overflow interrupt - TF0


•External hardware interrupt - INT0
•Timer 1 overflow interrupt - TF1
•External hardware interrupt - INT1
•Serial communication interrupt - RI/TI
Introduction
Serial communication with UART

UART stands for Universal Asynchronous Receiver-Transmitter. A UART generates its


internal data clock to the microcontroller. It synchronizes that clock with the data stream
by using the start bit transition. The receiver needs the baud rate to know ahead of time
to properly receive the data stream.
Serial communication with UART
Serial communication with UART
Serial communication with UART

- In Simplex mode, the communication is unidirectional, as on a one-way street.


- Full-duplex communication: A method where send and receive both have their
own transmission line so data can be simultaneously sent and received.
- Half-duplex communication: A method where communication is performed
using one transmission line while switching between send and receive.
Serial communication with UART
Serial communication with UART
Circuit design
Circuit design
Conclusion

8051 is a chip manufactured by intel

Asynchronous transmition method is used by 8051 chip

8051 use Full-duplex communication method

Using C# to communicate with 8051 MCU through serial port

You might also like