8051 I/O programming

Discussion in 'Embedded Systems and Microcontrollers' started by aghag, Oct 5, 2012.

  1. aghag

    aghag Thread Starter New Member

    Joined:
    Oct 5, 2012
    3
    0
    1.In 8051,Write a program to take in data through P1.1 and send it out through P2.6?
    2.In 8051,Write a program to monitor P1.6. when it is high,send 55H to P2?
    3.In 8051,Write a program to monitor the P2.5 bit. when it is high, send 99H to P1. If it is low, send 66H to P1?
    4.In 8051,Write a program to get status of P1.7 and put it on P1.2 continuously?
    5.In 8051,write a program to generate a square wave of 25% duty cycle on pin P2.5?

    NOTE: ALL PROGRAMMING IS DONE IN PINNACLE SOFTWARE USED FOR MICRO CONTROLLER 8051.PLEASE HELP ASAPTHANKS
     
    #1
  2. aghag

    aghag Thread Starter New Member

    Joined:
    Oct 5, 2012
    3
    0
    help please
     
    #2
  3. ActivePower

    ActivePower Member

    Joined:
    Mar 15, 2012
    155
    23
    Have you tried doing any of them? With what results?
     
    #3
  4. Arm_n_Legs

    Arm_n_Legs Active Member

    Joined:
    Mar 7, 2007
    183
    10
    MOV C,P1.1
    MOV P2.6,C

    WAIT: JNB P1.6,WAIT
    MOV P2,#55H

    JNB P2.5,W1
    MOV P1,#99H
    SJMP W2
    W1: MOV P1,#66H
    W2: ; continue from there

    W1: MOV C,P1.7
    MOV P1.2,C
    SJMP W1
     
    #4
    aghag likes this.
  5. aghag

    aghag Thread Starter New Member

    Joined:
    Oct 5, 2012
    3
    0
    can you please also explain which answer is to which i got a little confuse?
     
    #5
Loading...