I've re-written a routine to do what I want, using DATA/EEPROM statements and the READ command.
Code:
output 1 'Output 1 is the clock line
output 2 'Output 2 is the data line
low 1
low 2
symbol x = b1
symbol bit = b2
stp:
pulsout 1,2500 'Start bit pulse
for x = 1 to 16
read x,bit
bit = bit - 48
if bit=1 then high 2
endif
if bit=0 then low 2
endif
pulsout 1,1000 'Clock the module
pause 500
debug bit
next x
wait 5
goto stp
data_sub:
data 1,("1111110111101000") 'Command 65000 binary
This works extremely well, and also allows me to keep the binary "Word" within the data statements. This method also does not have the problem of the last 2-bits being high when they should not be. Plus this is easier for me to follow then the other method. 
This needs a bit more tidying up, but it works beautifully.
If I need more then 15 commands, I will have to use external EEPROM chip, but it might be a good chance for me to play with one of those at the same time...
Bookmarks