8051 Microcontroller Port Control

Discussion in 'Homework Help' started by ismailgursoy, Jan 21, 2015.

  1. ismailgursoy

    Thread Starter New Member

    Jan 21, 2015
    Hi everybody;

    I draw the circuit in Proteus in the appendix. According to the scheme ;

    *Data will be entered data from P0 port
    *entered data will be sent to P1 and LEDs will illuminate
    *the opposite of the data will be sent P2 LEDs will illuminate

    I wrote the program and I made them.

    But I can not do the following.

    *if P0 is equal to 36H data then p3.0 will attract contact a connected relay s and LED will be illuminate.

    My codes are:

    MOV A,P0;
    MOV P1,A;
    MOV A,P0;
    CPL A;
    MOV P2,A;
    MOV A,P0;
    SETB P3.0;
    MOV A,P0;

    And my circuit schema:

    I apologize for my english, I know very little. Thank you for your help.