I want to try to add the Signal-LED for channels in LC-application
-
Status for LED is to find in SysEx-Message <Hdr> 21 ii mm F7 (where “ii” represents the fader-channel and bit 1 of “mm” set LED for this channel “ON” or “OFF”)
-
I add line
Signal_LED_SR EQU 9 ;in my setup these LEDs are on shiftregister 9
to “main.asm” - Where is the best place to include following code? I would try to insert it to “MPROC.inc” in “Set_Meter_Mode” working with the second byte
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
movf Signal_LED_SR, W ; writes the Shiftregister-Number to W
mullw 0x08 ; multply with 8
movwf TMP1 ; save result in TMP1
movf LC_METER_CHANNEL, W ; writes channel-number to W
addwf TMP1 ; add W to TMP1 => result is DOUT-Pin for Signal-LED
movf TMP1, W ; writes TMP1 to W (for use with MIOS_Dout_PinSet....)
IFSET LC_MPROC_IN, 1, CALL MIOS_Dout_PinSet1 ; set LED "ON" if bit 1 of Meter_Mode-Byte is "1"
IFCLR LC_MPROC_IN, 1, CALL MIOS_Dout_PinSet0 ; set LED "OFF" if bit 1 of Meter_Mode-Byte is "0"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Or do we have to make a “SIGNAL_LED_REQUEST”-Flag and move the work to an extra subroutine called by “USER_Tick” or anything else?
Bye Pearl