Hi,
I want to add an external trigger before the pattern. But always fail. Would you help to check it? (trigger w{e} ;)
row1: dw 0000000000000001b ;Map green LED = D1 on the eval. board.
dw 0000000000000010b ;Map blue LED = D2 on the eval. board.
dw 0000000000000100b ;Map red LED = D3 on the eval. board.
dw 0000000000001000b ;Map green LED = D4 on the eval. board.
dw 0000000000010000b ;Map blue LED = D5 on the eval. board.
dw 0000000000100000b ;Map red LED = D6 on the eval. board.
dw 0000000001000000b ;Map green LED = D7 on the eval. board.
dw 0000000010000000b ;Map blue LED = D8 on the eval. board.
row9: dw 0000000100000000b ;Map red LED = D9 on the eval. board.
.segment program1 ;Program for engine 1.
mux_map_start row1 ;Map the first LED.
mux_ld_end row9 ;End address of the mapping data table.
trigger w{e} ;
rst
.segment program2 ;Program for engine 1.
loop1: ramp 0.1, 255 ;Increase PWM 0->100% in 0.2 second.
trigger s{3} ;Send trigger to engine2
mux_map_next ;Set the next row active in the mapping table.
branch 8,loop1 ;Loop 8 times.
wait 0.2
rst ;Reset program counter and start the program again.
.segment program3 ;Program for engine 2.
mux_map_start row1 ;Map the first LED.
mux_ld_end row9 ;End address of the mapping data table.
loop2: trigger w{2} ;Wait for trigger from engine1.
ramp 0.18,-255 ;Decrease PWM 100->0% in 1 second.
mux_map_next ;Set the next row active in the mapping table.
branch 8,loop2 ;Loop 8 times.
rst