Thanks for the info I didn't realise the instruction times were for assembly not pbp.

I set up the program as suggested and got a 6.2 KHz frequency readout +/-0.1 Khz.
The duty cycle is 50% +/-2%. (suggests about 27 us per command?)

The trace on the scope is not square; doen't even acheive the full amplitude - almost as though there is a stray capacitance somewhere.

I then tried the same program with the internal RC oscillator with similar results. I've checked and rechecked the circuitboard and all is as it should be.

I returned to the external resonator, and added a 'pause 5' to each half of the main loop and got the following readout on the scope:

Frequency 100.0 Hz
High pulse width 5000 us
Low pulse width 5000 us
Cycle time 10000 us
Duty cycle 50.00%

Not a flicker. Perfect squarewave form. Totally mystified.
Reprogrammed original program (cut down version as above). Same result of flickering up and down +/- 0.1% and being out by 4 ms.

I can't progress this any further due to other commitments for now so I'll wait until I can try another resonator on Monday. Any further suggestions welcome of course.

Many thanks