Code

mainloop:
High led
pause 250
low led
pause 250

Owout ibutton,1,[$33],mainloop
pause 100
owin ibutton,0,[Serial[0],Serial[1],Serial[2],Serial[3],Serial[4],Serial[5],Serial[6],Serial[7]]
'If Serial[1]=$15 and Serial[2]=$D3 and Serial[3]=$7D AND Serial[4]=$16 AND Serial[5]=$00 AND Serial[6]=$00 then correct1
'If Serial[1]=$68 and Serial[2]=$36 and Serial[3]=$4F AND Serial[4]=$17 AND Serial[5]=$00 AND Serial[6]=$00 then correct2
'If Serial[1]=$1E and Serial[2]=$1A and Serial[3]=$2C AND Serial[4]=$17 AND Serial[5]=$00 AND Serial[6]=$00 then correct3
'If Serial[1]=$F0 and Serial[2]=$66 and Serial[3]=$2C AND Serial[4]=$17 AND Serial[5]=$00 AND Serial[6]=$00 then nocache
If Serial[7]=$E6 then correct1
If Serial[7]=$90 then nocorrect
gosub wrong
Goto mainloop
We seem to be getting there.... My issue now has changed, I suspect a timing issue.

It loves the "wrong" gosub...if I hold the button on the contacts all good but the slightest slip and I am in the wrong gosub!

I have tried just minimising the code to the CRC of the serial and using that but the same results... putting delays in not helping...

I am hoping it is not the debounce on the contacts.... though we could fix that ??

Any Ideas anyone

Thank you ...Andy