Describe serial communication in 8051. Explain the use of SCON register.

1 Answer

Answer :

8051 micro controller communicate with another peripheral device through RXD and TXD pin of port3.controller have four mode of serial communication. 

1. Serial Data Mode-0 (Baud Rate Fixed) In this mode, the serial port works like a shift register and the data transmission works synchronously with a clock frequency of fosc /12. Serial data is received and transmitted through RXD. 8 bits are transmitted/ received at a time. Pin TXD outputs the shift clock pulses of frequency fosc /12, which is connected to the external circuitry for synchronization. The shift frequency or baud rate is always 1/12 of the oscillator frequency. 

2. Serial Data Mode-1 (standard UART mode)(baud rate is variable) In mode-1, the serial port functions as a standard Universal Asynchronous Receiver Transmitter (UART) mode. 10 bits are transmitted through TXD or received through RXD. The 10 bits consist of one start bit (which is usually '0'), 8 data bits (LSB is sent first/received first), and a stop bit (which is usually '1'). Once received, the stop bit goes into RB8 in the special function register SCON. The baud rate is variable 

3. Serial Data Mode-2 Multiprocessor (baud rate is fixed) In this mode 11 bits are transmitted through TXD or received through RXD. The various bits are as follows: a start bit (usually '0'), 8 data bits (LSB first), a programmable 9 th (TB8 or RB8)bit and a stop bit (usually '1'). While transmitting, the 9 th data bit (TB8 in SCON) can be assigned the value '0' or '1'. For example, if the information of parity is to be transmitted, the parity bit (P) in PSW could be moved into TB8.On reception of the data, the 9 th bit goes into RB8 in 'SCON', while the stop bit is ignored. The baud rate is programmable to either 1/32 or 1/64 of the oscillator frequency. 

f baud = (2 SMOD /64) fosc 

4. Serial Data Mode-3 - Multi processor mode(Variable baud rate) In this mode 11 bits are transmitted through TXD or received through RXD.The various bits are: a start bit (usually '0'), 8 data bits (LSB first), a programmable 9 th bit and a stop bit (usually '1'). Mode-3 is same as mode-2, except the fact that the baud rate in mode-3 is variable (i.e., just as in mode-1).

image

SM0 SCON.7 Serial port mode specifier

SM1 SCON.6 Serial port mode specifier.

SM0 SM1

0 0 Serial Mode 0

0 1 Serial Mode 1, 8-bit data, 1 stop bit, 1 start bit

1 0 Serial Mode 2

1 1 Serial Mode 3

SM2 SCON.5 Used for multiprocessor communication

REN SCON.4 Set/ cleared by software to enable/ disable reception.

TB8 SCON.3 – the 9th bit that will be transmitted in mode 2/3 set/clear by software.

RB8 SCON.2– in mode 2/3 it is the 9th bit that was received .

TI SCON.1 Transmit interrupt flag. Set by hardware at the beginning of the stop Bit in mode 1.

RI SCON.0 Receive interrupt flag. Set by hardware halfway through the stop bit time in mode 1. 

Related questions

Description : Draw the format of SCON register.

Last Answer : SM0 SCON.7 Serial port mode specifier SM1 SCON.6 Serial port mode specifier SM2 SCON.5 Used for multiprocessor communication (Make it 0.) REN SCON.4 Set/ cleared by software to enable/ ... flag. Set by hardware halfway through the stop bit time in mode 1. Must be cleared by software.

Description : Draw the format of TCON register of 8051 and describe the function of each bit of it.

Last Answer : TCON: TIMER/COUNTER CONTROL REGISTER.BIT ADDRESSABLE  TF1 TCON. 7 Timer 1 overflows flag. Set by hardware when the Timer/Counter 1 Overflows. Cleared by hardware as processor ... 0 type control bit. Set/cleared by software to Specify falling edge/low level triggered External Interrupt

Description : Draw the format of PSW register of 8051 microcontroller and explain the function of each bit.

Last Answer : 1. CY: Carry flag. This flag is set whenever there is a carry out from the D7 bit after an 8 bit addition or subtraction. It can also be set to 1 or 0 directly by instructions such as SETB C and ... the A register contains an odd number of 1s, then P=1. P=0 if A has an even number of 1s.

Description : Describe power down mode and ideal mode of 8051 with circuit diagram . which SFR is used to set these modes and draw the same.

Last Answer : IDLE MODE In the Idle mode, the internal clock signal is gated off to the CPU, but not to the Interrupt, Timer and Serial Port functions. The CPU status is preserved in its entirety, the Stack Pointer, ... t change on chip RAM PCON (Power Control Register) SFR is used to set these modes.

Description : Describe 8051 microcontroller as boolean processor.

Last Answer : * 8051 processor is a CPU that can perform some operation on a data and gives the output. * The 8051 processor contains a complete Boolean processor for single-bit operations. * The internal RAM contains 128 ... CLR C means clear the carry bit SETB 20h means set the memory bit with bit address 20h.

Description : Draw and explain Internal port structure of Port 0 and Port 1 of 8051 microcontroller.

Last Answer : Port-0 can be configured as a normal bidirectional I/O port or it can be used for address/data interfacing for accessing external memory. When control is '1', the port is used for address/data ... is not able to sink the current the pin voltage may rise, leading to a possible wrong reading.

Description : Explain with sketch the interfacing of 4 ×4 matrix keypad with 8051 microcontroller.

Last Answer : Interfacing keypad Fig. shows how to interface the 4 X 4 matrix keypad to two ports in microcontroller. The rows are connected to an output port and the columns are connected to an input port. To ... key has been pressed, the next task is to find out which column the pressed key belongs to.

Description : Explain following instructions of 8051. (i) ADDC (ii) L CALL

Last Answer : (i) ADDC: The ADDC instruction adds a byte value and the value of the carry flag to the accumulator. The results of the addition are stored back in the accumulator. Several of the flag ... . Then the program counter is loaded with the new address and control is transferred to the subroutine. 

Description : Explain processes of interrupt enabling and disabling in 8051.

Last Answer : Interrupts are the events that temporarily suspend the main program, pass the control to the external sources and execute their task. It then passes the control to the main program where it had left off. ... interrupts. Its bit sequence and their meanings are shown in the following figure.

Description : Explain function of following pins of 8051 (i) Pin 31 (ii) Pin 29 (iii) Pin 21-28 

Last Answer : i) Pin 31-EA : It is and active low I/P to 8051 microcontroller. When (EA)= 0, then 8051 microcontroller access from external program memory (ROM) only. When (EA) = 1, then it access internal ... /Output, when external memory is interfaced, PORT 2 pins act as the higher-order address bus. (A8-A15)

Description : Draw and explain the interfacing of DAC to 8051.

Last Answer : Diagram:  * Microcontroller generates output which is in digital form but many controlling system requires analog signal as they don't accept digital data thus making it necessary to use DAC ... current. Hence we require an I to V converter to convert this current into equivalent voltage. 

Description : State any four important features of 8051 microcontroller.

Last Answer : Features of 8051 microcontroller:  1) 8- bit data bus and 8- bit ALU. 2) 16- bit address bus - can access maximum 64KB of RAM and ROM. 3) On- chip RAM -128 bytes (Data ... 0 and Timer 1, two external hardware interrupts- INT0 and INT1, Serial communication interrupt for both receive and transmit.

Description : State the alternate pin functions of port 3 of 8051.

Last Answer :  the alternate pin functions of port 3 of 8051 :

Description : Draw interfacing of 16 × 2 LCD with 8051 and state the function of EN and RS of LCD

Last Answer : Diagram: RS: RS is the register select pin. We need to set it to 1, if we are sending some data to be displayed on LCD. And we will set it to 0 if we are sending some command instructions ... the LCD to latch in the data present at the data pins. This pulse must be a minimum of 450ns wide.

Description : List SFR in 8051.

Last Answer : ACC and B registers - 8 bit each DPTR : [DPH:DPL] - 16 bit combined PC : Program Counter - 16 bits Stack pointer SP - 8 bit PSW : Program Status Word Port Latches ... , serial control Timer Registers (TCON,TMOD,TL0/1,TH0/1) Power control Interrupt Enable, Interrupt Priority

Description : List specifications of 8051 microcontroller.

Last Answer : 1) 8- bit data bus and 8- bit ALU. 2) 16- bit address bus - can access maximum 64KB of RAM and ROM. 3) On- chip RAM -128 bytes (Data Memory) 4) On- chip ROM - 4 KB ( ... 0592 MHz 9) Has power down and idle mode in microcontroller when no operation is performed. 10) Six interrupts are available.

Description : In modes 2 and 3, if _____ bit of SCON bit is set will causes enable multiprocessor communication and is of ____ bit address. a) SM1, 9EH b) TB8 , 9CH c) SM2 , 9DH d) SM0, 9FH

Last Answer : c) SM2 , 9DH

Description : In 8051,After reset the SP register is initialized to address________. a. 8H b) 9H c) 7H

Last Answer : c) 7H

Description : List out any two instructions of following addressing modes: (i) Immediate addressing. (ii) Register addressing.

Last Answer : (i) Immediate addressing instructions: 1. MOV A, #36H 2. MOV DPTR, #27A2H (ii) Register addressing. 1. MOV A, R0 2. MOV R7, A

Description : What is the Address (SFR) for TCON, SCON, SBUF, PCON and PSW respectively? a) 88H, 98H, 99H, 87H, 0D0H. b) 98H, 99H, 87H, 88H, 0D0H

Last Answer : a) 88H, 98H, 99H, 87H, 0D0H

Description : Explain in detail about serial in serial out shift register.

Last Answer : • Block diagram • Theoretical explanation • Logic diagram • Working

Description : Describe with sketches the procedure to troubleshoot the traffic light controller.

Last Answer : Considerations of Traffic Signal  1) Traffic light may have sensors integrated to provide real time traffic information  2) Based on the traffic information provided by the sensor, the duration of the ... 8) Capacity analysis of the intersection for current and future years using growth

Description : Is it legal to download software from a 3rd party site if you intend to register and activate it using a legally purchased serial number?

Last Answer : answer:It would be legal, because you purchase the license not the disk itself. Downloading the software in itself is not a crime, using it without a legally purchased license is.

Description : A register capable of shifting its binary information either to the right or the left is called a_________ A. parallel register. B. serial register. C. shift register. D. storage register.

Last Answer : C. shift register.

Description : Explain the use of following assembler directives. (i) EQU (ii) ORG

Last Answer : (i) EQU: Equate It is used to define constant without occupying a memory location. Syntax: Label EQU Numeric value By means of this directive, a numeric value is replaced by a symbol. For e.g. ... decimal. If the number is notfollowed by H, it is decimal and the assembler will convert it to hex.

Description : Explain the following instructions. SWAP A ADD C MUL AB CJNE A, add, radd MOV A, R0 MOVX A, @ A + DPTR.

Last Answer : SWAP A Description: This instruction exchanges bits 0-3 of the Accumulator with bits 4-7 of the Accumulator. This instruction is identical to executing "RR A" or "RL A four times ... referred to as the base address and the accumulator value is referred to as the index address.

Description : Explain the various selection factors of microcontroller suitable for application.

Last Answer : The selection of microcontroller depends upon the type of application. The following factors must be considered while selecting the microcontroller.  1. Word length: The word length of ... and for lesser production EPROM version or CPU version with external program memory is suitable

Description : State and explain the need of the following development tools microcontroller board: (i) Editor (ii) Assembler (iii) Compiler (iv) Linker

Last Answer : 1) Editor: An editor is a program which helps you to construct your assembly language program in right format so that the assembler will translate it correctly to machine language. So, you can type your ... . Some examples of linker are ASEM-51 BL51, Keil u Vision Debugger, LX 51 Enhanced Linker etc

Description : What is serial communication in Arduino?

Last Answer : Serial communication in Arduino is a method of transmitting data between an Arduino board and a computer or another microcontroller using a serial port.

Description : What is the minimum number of wires needed to send data over a serial communication link layer? a. 1 b. 2 c. 4 d. 6 e. none of above

Last Answer : 2

Description : Which data communication method is used to transmit the data over a serial communication link? a. simplex b. half-duplex c. full-duplex d. b and c e. None of above

Last Answer : full-duplex

Description : How many 8-bit characters can be transmitted per second over a 9600 baud serial communication link using asynchronous mode of transmission with one start bit, eight data bits, two stop bits, and one parity bit ? a. 600 b. 800 c. 876 d. 1200

Last Answer : b. 800

Description : In asynchronous serial communication the physical layer provides ___________ a. start and stop signalling b. flow control c. both start & stop signalling and flow control d. only start signalling

Last Answer : c. both start & stop signalling and flow control

Description : Which transmission mode is used for data communication along telephone lines? (A) Parallel (B) Serial (C) Synchronous (D) Asynchronous

Last Answer : (B) Serial

Description : In serial communication modes, mode 1 the Baud rate = a) BR=2SMOD/32 * (Timer 0 over flow rate) b) BR=2SMOD/16 * (Timer 1 over flow rate) c) BR=2SMOD/16 * (Timer 0 over flow rate) d) BR=2SMOD/32 * (Timer 1 over flow rate)

Last Answer : b) BR=2SMOD/16 * (Timer 1 over flow rate)

Description : The start and stop bits are used in serial communication for (A) error detection (B) error correction (C) synchronization (D) slowing down the communication

Last Answer : (C) synchronization 

Description : In 8051 an external interrupt 1 vector address is of ________ and causes of interrupt if ____. a) 000BH, a high to low transition on pin INT1 b) 001BH, a low to high transition on pin INT1 c) 0013H, a high to low transition on pin INT1 d) 0023H, a low to high transition on pin INT1

Last Answer : a) 000BH, a high to low transition on pin INT1

Description : SP of 8051 is of ___ wide and it is loaded with the default value of ___ after reset. a) 2 byte, 08H b) 8 bit, 07H c) 1 byte, 09H d) 8 bit, 06H

Last Answer : d) 8 bit, 06H

Description : In 8051 which interrupt has highest priority? a)IE1 b)TF0 c)IE0 d)TF1

Last Answer : a)IE1

Description : The 8051 microcontroller is of ___pin package as a ______ processor. a) 30, 1byte b) 20, 1 byte c) 40, 8 bit

Last Answer : c) 40, 8 bit

Description : In 8051 which interrupt has highest priority? a)IE1 b)TF0 c)IE0 d)TF1

Last Answer : c)IE0

Description : The 8051 microcontroller is of ___pin package as a ______ processor. a) 30, 1byte b) 20, 1 byte c) 40, 8 bit d) 40, 8 byte

Last Answer : c) 40, 8 bit

Description : List out features of any four addressing modes of 8051.

Last Answer : 1.Immediate addressing mode: In this Immediate Addressing Mode, the data is provided in the instruction itself. The data is provided immediately after the opcode. These are some examples of Immediate Addressing Mode. MOVA ... us see some examples of this mode. MOV 0E5H, @R0 MOV @R1, 80H

Description : Which instruction of 8051 microcontroller is used for reading data from code memory?  A) Mov B) MOVC C) MOVX D) XCH

Last Answer : Mov

Description : Define the term BUS related to microprocessor/controller and list different buses used in microcontroller.

Last Answer : BUS: A Bus is a set of physical connections used for communication between CPU and peripherals. Different buses used in microcontroller are: 1. Address Bus 2. Data Bus 3. Control Bus

Description : Find out the number of address lines required to access 4 KB of RAM

Last Answer : 12 address lines required to access 4 KB of RAM as  212 = 4KB 

Description : Differentiate between (i) Harvard and Von-neuman architecture (ii) Microprocessor and Microcontroller

Last Answer : i) Harvard Architecture and Von-neuman architecture ii) Microprocessor and Microcontroller

Description : Develop Assembly Language program (ALP) to find the largest number in a block of 10 numbers stored at location 40H onwards in internal RAM.

Last Answer : ORG 0000H MOV R1, #0AH ; Initialize Byte Counter MOV R0, #40H ; Initialize source pointer R0 to 40H DEC R1 ; decrement counter by one MOV 60H, @R0 ;Read First Byte UP: INC R0 ; Increment the ... MOV A,B MOV 50H, A ; store result at memory location 50H(Assume any location) HERE: SJMP HERE

Description : State features of ADC 0808.

Last Answer : 1. Easy to interface with all Microprocessors or works Stand alone. 2. Eight channel 8-bit ADC module. 3. Can measure up to 8 Analog values. 4. On chip Clock not available, external Oscillator ... (Clock). 5. Digital output various from 0 to 255, operating power is 15mW, conversion time 100us.