Showing posts with label #8051microcontrollerbasics. Show all posts
Showing posts with label #8051microcontrollerbasics. Show all posts

Friday, 12 June 2020

STEPS TO TRANSFER AND RECIEVE THE DATA SERIALLY

✏️STEPS TO TRANSFER THE DATA SERIALLY

1) TMOD register is loaded with value 20H indicating the use of timer 1 in mode 2to set baud rate.
2) TH1 is loaded with the appropriate value to set the required baud rate.
3) SCON register is loaded with the value 50H indicating serial mode1.
4) TR1 is set to start timer1.
5) TI is cleared by the CLR TI instruction.
6) Now we have to be load SBUF.
7) character byte to be raised serially is written in to SBUF sequence.
8) The TI flag is monitored with use of instruction JNB.
9) To see if the character has been transferred.
7. To transfer the next character go to step 5 and continue the process. 

✏️STEPS TO RECEVING THE DATA SERIALLY

1) The TMOD register  loaded with the value 20H.
2) TH1 is loaded with the appropriate value to set the required baud rate.
3) SCON register is loaded with the value 50H indicating serial mode1.
4) TR1 is set to start timer1.
5) CLR RI is used to clear RI bit.
6) The RI flag is monitored use of instruction JNB RI.
7) When RI raised SBUF has contents and it is moved into safe place.
8) To receive the next character go to step 5 and continue the process again and again. 

SERIAL COMMUNICATION AND ITS TYPES

✏️SERIAL COMMUNICATION AND ITS TYPES

📌SERIAL COMMUNICATION:-
💁‍♂️The process of transmitting data one bit at a time.
Data may be 8bit/32bit/16bit.
Example:-interfacing between a keyboard and a computer.

📌PARALLEL COMMUNICATION:-
💁‍♂️It is method of conveying multiple data simultaneously at a time.
Example:-integrated circuits,in peripheral buses and in memory devices such as RAM.

✏️NEED FOR SERIAL COMMUNICATION
💁‍♂️Within a microcontroller, the data is transmitted in parallel form, i.e  more than one bit at a time , typically 8 or 16 bits.
💁‍♂️The parallel transmission provides faster data transfer.
💁‍♂️To transmit data over long distance,the parallel data transfer is not preferred because it requires many wires which results in higher cost of a system.
💁‍♂️For long distance data to be transmitted is usually converted converted from the parallel to serial,so that it can be transmitted through a single wire  one bit at a time.
💁‍♂️The data is again converted back into parallel form so that it can be easily processed.

✏️TYPES OF SERIAL COMMUNICATION 
There are three types:-
         1) simplex
         2) half duplex
         3) full duplex


1) Simplex serial communication:-

💁‍♂️A simplex system can transmit data only in one direction i.e it is a one way communication.                                                  
Example:-Radio and television broadcasting,sending the data from keyboard to CPU,etc….

2) Half duplex communication:-
💁‍♂️The data transfer can take place in both directions between the two systems,but only in one direction at a time.
Example:-two-way radio system is a half-duplex system


3) FULL DUPLEX COMMUNICATION:-
💁‍♂️The communication can take place in both the direction simultaneously between two systems and separate wires are required for transmission.
Example:-Telephone line
This system is illustrated in figure
           TXD=Transmitter output.
           RXD=Receiver input.

💁‍♂️In simple words, if I'm explaining all 3 types of serial communication this, we could understand this in Figure shown below 👇

💁‍♂️ARTIFICIAL SUN CREATED BY CHINA 👈

🌞 ARTIFICIAL SUN MADE BY CHINA 🌞 ☀️China successfully powered up its “artificial sun” nuclear fusion reactor for the first ti...