picstudent, there's no need to supply all 8 bits. Any missing high-order bits are assumed to be zero, so in this instance, porta.0 to porta.5 are inputs,
In the first code, there's no loop so the code will shoot through once then fall off the end. Is this the complete code? If so, there needs to be something to stop processing at the end.
eg.
end:
goto end
If you haven't got this, the processor is looping right through memory and is crashing. A voltage of 3V or so would imply the pin is floating (ie. has become an input) or is bouncing up and down quickly. Either way, your code has fallen off the end and the processor is performing a big loop around the full address space.
In the second piece of code,
define osc 20
trisa = %111111
trisb = %00000000
x var byte
start:
x=0
while porta.0 =1 and x = 10
portb.0 = 1
x=x+1
wend
this won't do anything because x starts at 0 but your while loop will only perform if x=10, so it will never go into it.
Freddy