Dear All,
plese help me I'm biggner in pic mcu I need help can we make same pin as an input and output in pic mcu like in PIC16F870.I'm using basic language.
Thanks in advance
You can make it an input OR an output, not both at the same time.
You can change it from your code but I can't give you the code because I haven't used basic.
Another possibility beyond described by alexan, and I already used, is to share some funcional pin ( not generic I/O ).
For example, when pinout account is not enough I often use ICSP input also like regular output.
The only care is to hang proper impedance within acceptable range , according datasheet specifications.