' six byte array (28 through 33) representing the six diplay panels
symbol Cur_LED_Array = 28
' Pointers to individual bytes for each panel
symbol Panel1 = 28
symbol Panel2 = 29
symbol Panel3 = 30
symbol Panel4 = 31
symbol Panel5 = 32
symbol Panel6 = 33
'Pointers to Sequence2 Source Patterns
symbol Tgt_LED_Array2a = 12
symbol Tgt_LED_Array2b = 16
symbol Tgt_LED_Array2c = 24
symbol Tgt_LED_Array2d = 32
'Sequence2 Source Patterns
DATA Tgt_LED_Array2a,(%00011000,%00111100,%01111110,%11111111)
DATA Tgt_LED_Array2b,(%10000000,%11000000,%11100000,%11110000,%11111000,%11111100,%11111110,%11111111)
DATA Tgt_LED_Array2c,(%00000001,%00000011,%00000111,%00001111,%00011111,%00111111,%01111111,%11111111)
Data Tgt_LED_Array2d,(%10000001,%11000011,%11100111,%11111111)
symbol loopctr1 = b1
symbol loopctr2 = b2
symbol tmpval1 = b11
symbol tgtval = b14
symbol tmpval2 = b12 ' tmpwrd LSB
symbol tmpval3 = b13 ' tmpwrd MSB - holds shift-left carry
' Sweep-Up Routine
Sequence2:
byte_pattern = %00000000 ' zero's out all six panels
gosub Set_Byte_Pattern
for Loopctr2 = 1 to 8 'this gives me four full up sweeps.
'Sweep ON on the odd count, seeep OFF on the even count
tmpval3 = Loopctr2 AND 1 is this an odd or even loop cycle?
'Panel5 - do the bottom panel first
tmpval1 = Tgt_LED_Array2a ' point to bottom panel frame array
bptr = Panel5
for Loopctr1 = 1 to 4 ' step through the four frames
read tmpval1, tgtval
if tmpval3 = 1 then ' Inverts the same pattern data for "sweep off"
tgtval = tgtval NAND %11111111
endif
@bptr = tgtval
gosub Output_to_SR 'send out the animation frame
inc tmpval1
pause pause_val ' speed control
next Loopctr1
'Panel4 and Panel6
tmpval1 = Tgt_LED_Array2b 'Point to Tgt LED Array B
for Loopctr1 = 1 to 8
bptr = Panel4
read tmpval1, tgtval
if tmpval3 = 0 then
tgtval = tgtval NAND %11111111
endif
@bptr = tgtval
tmpval2 = tmpval1 + 8 ' Point to Tgt LED Array C
bptr = Panel6
read tmpval2, tgtval
if tmpval3 = 0 then
tgtval = tgtval NAND %11111111
endif
@bptr = tgtval
gosub Output_to_SR 'send out the animation frame
inc tmpval1
pause pause_val ' speed control
next Loopctr1
''Panel1 and Panel3
tmpval1 = Tgt_LED_Array2b
for Loopctr1 = 1 to 8
bptr = Panel1
read tmpval1, tgtval
if tmpval3 = 0 then
tgtval = tgtval NAND %11111111
endif
@bptr = tgtval
tmpval2 = tmpval1 + 8
bptr = Panel3
read tmpval2, tgtval
if tmpval3 = 0 then
tgtval = tgtval NAND %11111111
endif
@bptr = tgtval
gosub Output_to_SR 'send out the animation frame
inc tmpval1
pause pause_val
next Loopctr1
'Panel2
tmpval1 = Tgt_LED_Array2d
bptr = Panel2
for Loopctr1 = 1 to 4
read tmpval1, tgtval
if tmpval3 = 0 then
tgtval = tgtval NAND %11111111
endif
@bptr = tgtval
gosub Output_to_SR
inc tmpval1
pause pause_val
next Loopctr1
next Loopctr2
goto Sequence2 ' rinse and repeat