Hi,
I've never played with the 1-wire commands but according to the manual you should be able to use the STR modifier to send an array of bytes out. So, an educated guess is something like:
Code:
OWbuffer VAR BYTE[8] ;Array for outgoing data
'Assign values for sensor 1 to the array.
OWbuffer[0]= $26 : OWbuffer[1]= $7A
OWbuffer[2]= $BA : OWbuffer[3]= $11
OWbuffer[4]= $01 : OWbuffer[5]= $00
OWbuffer[6]= $00 : OWbuffer[7]= $D8
GOSUB OWRoutine 'Send it
'Assign values for sensor 2 to the array.
OWbuffer[0]= $26 : OWbuffer[1]= $A7
OWbuffer[2]= $AB : OWbuffer[3]= $11
OWbuffer[4]= $10 : OWbuffer[5]= $00
OWbuffer[6]= $00 : OWbuffer[7]= $E8
GOSUB OWRoutine 'Send it
END
OWRoutine:
OWOUT DataPin,1,[MatchRom, STR OWBuffer \8, ConvertV]
RETURN
This way you only have one "instance" of the OWOUT command which should save you a couple of words compared to having 26 of them (if that's what you currently have).
/Henrik.
Bookmarks