This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Set port1 pins as 0 or 1

Dear all,
i am using P89V51RD2 (philips) 8051 micro-controller. i am doing some samples with NSK developemnt kit. In this i want to set the Port1 pint 0 to 7 as high/low continiously. I tried this by using the following lines,

P1 = 0x00 ;
delay(10000) ;
P1 = 0xFF ;

but still i am always getting around 5V on these pins. i searched lot of forums, but in that also they mentioned like this only. Kindly give your suggessions.......

Thanks and Regards
Radhakrishnan M

Parents
  • Dear all, Thanks for your replies. i am new to this micro-controller domain. so i might have missed something. i am using Keil uVision4.22 to program for 8051 micro-controller with C. Using this i want to configure few ports as input(ex port1 as input). Suppose if i initialize the value with 0 then whenever i connect some input in this port then i will show either off or intermediate state.

    Thanks and Regards
    Radhakrishnan M

Reply
  • Dear all, Thanks for your replies. i am new to this micro-controller domain. so i might have missed something. i am using Keil uVision4.22 to program for 8051 micro-controller with C. Using this i want to configure few ports as input(ex port1 as input). Suppose if i initialize the value with 0 then whenever i connect some input in this port then i will show either off or intermediate state.

    Thanks and Regards
    Radhakrishnan M

Children