I'm using: PBPL on a PIC18F1220 and reading data from a SHT15 temperature/humidity sensor. Two issues:

1. I want the PIC to keep going in the main loop even if the SHT15 is not connected. However, the code includes:

while DataPin = 0 .... wend
.........
while DataPin = 1 .... wend

So, the loop halts if the sensor does not set/clear the DATAPIN. I guess there is a simple way to fix this - but it escapes me at the moment. Any ideas?

2. And a speed issue. All works OK with a 20MHz xtal and 'HS' compile. But with an 8MHz xtal and 'HSPLL' the SHT15 gives bad results. All the other routines work OK at 32Mhz and I have tried DEFINE SHIFT_PAUSEUS 1000; this puts the SHIFT clock at <1KHz and the SHT15 is rated to 50KHz - but no luck. Any ideas?

Regards Bill Legge