Computer Science, asked by dixitahadagali123, 2 months ago

Write a
program to get 8-bit data from P1
and send it to ports P0,P2 and P3. (MICROCONTROLLER)​

Answers

Answered by rjrjjrr
0

Answer:

I need pc

Explanation:

kskdkkdkdkkdoldodofikrkkrke

Answered by peednas93
1

Explanation:

Apparatus/software:

1. 8051 microcontrollerkit /keil evaluation

version/sdcc —1

2. C.R.O

3. Connecting wires. --1

Algorithm:

Step1: Write 0FF hex to make port2 as input port.

Step2: Read port 2 into reg A

Step3: complement regA

Step3: Write reg A to port1

Step4: Repeat step 2 to step3

Program:

MOV A, #0FFH ;A=FF hex

MOV P

2, A ;make P0 an i/p port by writing it all 1s

BACK: MOV A, P2 ;get data from P2

CPL A

MOV P0, A ;send it to port 1

SJMP BACK ;keep doing it

Procedure:

1. Compile the program in keil compiler.

2. Down load program into micro controller.

3. set input in port 2

4. verify output in port 1

Expected results:

The values set to port 2 are read and send to port1.

Hex file generated:

:0B00000074FFF5A0E5A0F4F59080F976

:00000001FF

Similar questions