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

P89LPC932 Quasi-bidirectional ports

If I configure port 0 to be an Input and Output port.

I need to make a pin for instance pin 1 an input pin. I do
P0^1 = 1; //is this OK?
If I make it Output pin then
P0^1 = 0; //right?

My question is...what do I do if I need to make the pin High or Low while it is either input or Output?
How would configure that.
Thanks

Parents
  • If you are using the pin is an output you write a '0' to it to make it low, '1' to make it high.

    If you are using the pin is an input, you apply zero volts to it to make it low, 5 volts to make it high.

    To understand why the pin can be both an input and an output (depending on the external circuitry) after you have written '1' to it you really must read the datasheet.

    Stefan

Reply
  • If you are using the pin is an output you write a '0' to it to make it low, '1' to make it high.

    If you are using the pin is an input, you apply zero volts to it to make it low, 5 volts to make it high.

    To understand why the pin can be both an input and an output (depending on the external circuitry) after you have written '1' to it you really must read the datasheet.

    Stefan

Children
No data