Thank yo to all who replied to assist.
The problem turned out to be a collection of things, the biggest of which had nothing to do with the Pi or its programming. I had a USB hub that was faiuling intermittently, dtopping correct functioning of the keyboard, mouse and the Salae Analyser and probably the PicLit2 programmer. Once identified and fixed by replacement, order returned to the anlaysis.
Comments on your various replies:
I had not turned of the comparator. That change breathed life into the outputs.
I like the suggestion of ALLDIGITAL. I shall use that in future. But along the same lines, after the turn off of comparator advice I went painstakingly through the datasheet writing ALL bits to all registers whether I used that function or not. (First through I set only the bits for functions I (thought) I was using)
The outputs being driven are servos,and they draw little current. The power interface is built into the servos, which have separate power wiring. No change in performance measured at the Pic pins with servos disconnected or not - same analyser output.
The program correctly sets the pins as digital and as IP or OP as required. Including GP3 as IO, not MCLR.
The program correctly sets PullUps for GP4 and GP5 (But it turns out cannot cannot set GP3 for PullUps when used as a digital Input)
My reading of pin voltages was to see if I had Logic 1 or Logic 0 on the pins correctly under control of the switches. In other words I was looking for below 0.8v or above 2.0v, which I understand from my reading of the datasheet are the logic threshold voltages. What I was reading was in accord with the datasheet, but in the case of GP3, not my expectations.
Outcome:
Once the analyser was reliably active post USB Hub transplant, I found the period of the pulse train to the servos was 40ms - double that expected, so the servos ignored the signal. Cause was I had set the oscillator to 8MHz, but had not told the PROGRAM this frequency applied. DEFINE OSCILLATOR FREQUENCY = 8 and I had the right period for pulse train to the servos, and they then responded.
I now had two of three channels responding correctly to switch inputs. The third was GP3, which the program set to be digital Input instead of MCLR Input. But sadly I had mis-read the datasheet to mean that being an input, this pin automatically had its PullUp enabled. I does, but on close reading of the datasheet and its notes, ONLY WHEN SET AS MCLR. Set as IO it has no PullUp, which is what my voltmeter and the analyser was telling me - always logic 0. No choice but to add an external resistor, confirmed to work by my test PCB, analyser and trusty voltmeter. Once added to the "Production" PCBs all now works fine.
Important conclusions for me from this exercise are:
* Set all registers whether you are using that function or not.
* Don't believe every problem is related to the micro-controller your program. External things we take for granted can fouls things up very effectively.
* Most important of all, read the data sheet carefully for what it actually says, not what you expect ot imagine it shold say.
Thanks again to all of you. I hope my experience in this may also help others.