0% found this document useful (0 votes)
1K views3 pages

Serial Communication in AT89C2051 With Labview

1. The document describes setting up a serial connection between an AT89C2051 microcontroller and a PC using LabVIEW. 2. A LabVIEW interface is developed to control the output port of the AT89C2051 device via a serial port. 3. When the program is run on the AT89C2051, it successfully reads incoming serial data and outputs it on port 1, demonstrating the serial connection is functioning properly.

Uploaded by

sandipnair06
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views3 pages

Serial Communication in AT89C2051 With Labview

1. The document describes setting up a serial connection between an AT89C2051 microcontroller and a PC using LabVIEW. 2. A LabVIEW interface is developed to control the output port of the AT89C2051 device via a serial port. 3. When the program is run on the AT89C2051, it successfully reads incoming serial data and outputs it on port 1, demonstrating the serial connection is functioning properly.

Uploaded by

sandipnair06
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Serial communication in AT89C2051 with labview

By Sandip Nair [email protected] sandipnair.hpage.com

Aim: To set up a serial connection between AT89C2051 and PC and test the result. Method: - A Labview interface is developed to control the output of the port 1 of the device using serial port. When simulating the program below in keil, it shows that SBUF data is not read by the processor for the MOV A, SBUF instruction but in actual the hardware does read the data from the SBUF. Program: //program to test the serial interface with AT89C2051 ORG 0x0000; MOV P1, #0x00; //making output of port 1 low MOV IE, #0x90; // enabling global interupt and serial interrupt MOV TMOD, #0x20; //setting timer in auto reload mode i.e. mode2 SETB TR1; //start timer 1 MOV SCON, #0x50; //setting serial in mode 1 and enabling receive MOV TH1, #0xFD; //loading value for 9600 baud rate for timer 1 auto reload L1: SJMP L1; //serial ISR instruction ORG 0x0023; CLR RI; //clearing the RI receive interrupt bit MOV A, SBUF; //moving buffer data to accumulator MOV P1, A; //passing the accumulator data to output RETI; END;

Labview interface: -

Figure1. Labview front panel

Figure2. Block diagram Result: - The above work is shown only to send data from labview over serial port.

You might also like