Hi,
I worked lots of projects using PIC18 microcontroller.
Now I am in need of using PIC16F628A for a project. Crystal used 6.144Mhz.
I have configured the B4-B7 pins as inputs using TRIS register.
TRISB = 0b11110000;
But when i measure the voltage at B7 pin, it shows +5V. I have left the pin open.
try pulling them down through 10 k resistor to ground if you want them to be initialized to be zero always .Also when a port is generally set as input it has a floating value so it is generally in the range of 3 to 5 v So this might be the case here . Also check POR values of the PORTB ,and OPTION_REG for RBPU . Also first thing to check would be board connections as mentioned above .