Implementation of a program to communicate data to another 8051-microcontroller  using USART module of 8051.(using Keil and 8051 burners)

Experiment No.: – 10

Aim of the experiment: –

Implementation of a program to communicate data to another 8051-microcontroller  using USART module of 8051.(using Keil and 8051 burners)

Apparatus required: –

Sl. No.NameSpecificationQuantity

Algorithm: –

Implementation of a program to add and subtract two 8-bit and 16-bit numbers using  different addressing modes.

Table No. 2.1
  1. Start.
  2. Load 00H into CL Register (for Carry).
  3. Load the 1st data into AL Accumulator from Memory.
  4. Load the 2nd data into BL Register from Memory.
  5. Add BL with Accumulator AL.
  6. Jump if no Carry.
  7. Increment CL by 1.
  8. Move data from AL to memory location.
  9. Move data from CL to memory location.
  10. Stop.
Table No. 2.2
\[\color{\orange}{Input:}\] \[\color{\green}{3000H—> FFH}\] \[\color{\green}{3001H—>12H}\] \[\color{\red}{Output:}\] \[\color{\red}{3002H—>11H}\] \[\color{\red}{3003H—>01H}\]
  1. Load 00H into CL Register (for Carry).
  2. Load the 1st data into AL Accumulator from Memory.
  3. Load the 2nd data into BL Register from Memory.
  4. Subtract BL from Accumulator AL.
  5. Jump if no borrow.
  6. Increment CL by 1.
  7. Move data from AL to memory location.
  8. Move data from CL to memory location.
  9. Stop.
Table No. 2.3
\[\color{\orange}{Input:}\] \[\color{\green}{3000H—> F8H}\] \[\color{\green}{3001H—>FFH}\] \[\color{\red}{Output:}\] \[\color{\red}{3002H—>F9H}\] \[\color{\red}{3003H—>01H}\]
  1. Load 0000H into CX Register (for Carry).
  2. Load the 1st data into AX Accumulator from Memory.
  3. Load the 2nd data into BX Register from Memory.
  4. Add BX with Accumulator AX.
  5. Jump if no Carry.
  6. Increment CX by 1.
  7. Move data from AX to memory location.
  8. Move data from CX to memory location.
  9. Stop.
Table No. 2.4
\[\color{\orange}{Input:}\] \[\color{\green}{3000H—> E9H}\] \[\color{\green}{3001H—>FFH}\] \[\color{\green}{3002H—>ABH}\] \[\color{\green}{3003H—>F8H}\] \[\color{\red}{Output:}\] \[\color{\red}{3004H—>94H}\] \[\color{\red}{3005H—>F8H}\] \[\color{\red}{3006H—>01H}\] \[\color{\red}{3007H—>00H}\]
  1. Load 0000H into CX Register (for Carry).
  2. Load the 1st data into AX Accumulator from Memory.
  3. Load the 2nd data into BX Register from Memory.
  4. Subtract BX from Accumulator AX.
  5. Jump if no borrow.
  6. Increment CX by 1.
  7. Move data from AX to memory location.
  8. Move data from CX to memory location.
  9. Stop.
Table No. 2.5
\[\color{\orange}{Input:}\] \[\color{\green}{3000H—> FFH}\] \[\color{\green}{3001H—>12H}\] \[\color{\green}{3002H—>34H}\] \[\color{\green}{3003H—>F1H}\] \[\color{\red}{Output:}\] \[\color{\red}{3004H—>CBH}\] \[\color{\red}{3005H—>11H}\] \[\color{\red}{3006H—>01H}\] \[\color{\red}{3007H—>00H}\]

To be written by student.

Instructions Used –

MOV – for copy data.

ADD – for addition.

SUB/SBB – for subtraction.

JNC – for jump if no carry/borrow.

INC – for increment.

INT A5/HLT – for stop/end.

Program: –

Result: –

Conclusion: –

To be written by student.