I know not strictly to do with PIC Basic, but if anyone is interested, I rewrote this into ProtonBasic (Crownhill) :eek: and it works just fine. I'll post the code here when I'm on my own PC.