ERM
05-23-2006, 10:49 AM
Hi guys (and gals),
I am trying to reapply Jon Williams' sequencer.bs2 code where he has entered data into the EEPROM data section. That data looks like this:
' -----[ EEPROM Data ]-----------------------------------------------------
RecLen CON 3 ' 3 bytes per record
ZigZag DATA Word %0000000010000000, 2
DATA Word %0000000101000000, 2
DATA Word %0000001000100000, 2
DATA Word %0000010000010000, 2
DATA Word %0000100000001000, 2
DATA Word %0001000000000100, 2
DATA Word %0010000000000010, 2
DATA Word %0100000000000001, 2
DATA Word %0010000000000010, 2
DATA Word %0001000000000100, 2
DATA Word %0000100000001000, 2
DATA Word %0000010000010000, 2
DATA Word %0000001000100000, 2
DATA Word %0000000101000000, 2
DATA Word %0000000010000000, 2
DATA Word %0000000000000000, 0
Now, rearranging this data, can this format be used in single lines of code instead of writing it into the EEPROM. (i.e.
%0100000000000001, 2
Instead of writing:
high 0
pause 200
low 0
I know the above %000...1, 2 code does not work, but can it be rewritten to work to refrain from using the latter code saving space?
Thanks,
Tony
I am trying to reapply Jon Williams' sequencer.bs2 code where he has entered data into the EEPROM data section. That data looks like this:
' -----[ EEPROM Data ]-----------------------------------------------------
RecLen CON 3 ' 3 bytes per record
ZigZag DATA Word %0000000010000000, 2
DATA Word %0000000101000000, 2
DATA Word %0000001000100000, 2
DATA Word %0000010000010000, 2
DATA Word %0000100000001000, 2
DATA Word %0001000000000100, 2
DATA Word %0010000000000010, 2
DATA Word %0100000000000001, 2
DATA Word %0010000000000010, 2
DATA Word %0001000000000100, 2
DATA Word %0000100000001000, 2
DATA Word %0000010000010000, 2
DATA Word %0000001000100000, 2
DATA Word %0000000101000000, 2
DATA Word %0000000010000000, 2
DATA Word %0000000000000000, 0
Now, rearranging this data, can this format be used in single lines of code instead of writing it into the EEPROM. (i.e.
%0100000000000001, 2
Instead of writing:
high 0
pause 200
low 0
I know the above %000...1, 2 code does not work, but can it be rewritten to work to refrain from using the latter code saving space?
Thanks,
Tony