We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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
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