Is it only one pin?
The reason could be
program not work, and you have tri state outputs,
pin not set to be output - how about TRIS?
pin source too much current,
pin oscilate and you measure DC.
solutions:
show us your soft,
measure pin state with AC - while oscilating there will be voltage on AC,
measure voltage with resistor (~kohm) conected to ground. if pin is really output, the voltage sholuld be ~the same
how about low level voltage?
try to write soft with loop 1 s low, 1 s high, it is something you are able to measure without oscilloscope