In live, I constantly need to have the “track mute†under the fingers, so I would like to add a line of 16 independent mute buttons (short cuts of the 16 buttons in mute mode already existing) without that changing posting in progress on LCD Screen, (for example track edict or any other mode). There is just enough place to add 16 buttons on 3rd module DIN. I hardly beginning programmation in C language, and I see that MBSEQ V3 application is in .asm. ???
No, but you can learn it in reverse… Write some simple C code and compile it, and look in the _output directory to see what the ASM looks like. The comments contain your original code. Use that in conjunction with the instruction set in the datasheet and it will help you to relate ASM to C
Most of the chips in the same family (eg PIC18F*) will use the same instructions, so what you learn for the 452 is also useful for the 4620 and to some extent the 4685… and to a lesser extent the PIC16F series, which has similar instructions but not as many. Read the datasheets, give it a try, and you’ll see.
Hrm.. I don’t want to be a tease.. but.. if you take some time to learn the basics of ASM first I’d be happy to walk you through how to make these modifications. They will be fairly similar to how I did the prototype code for the MB808.. stop into the chat room sometime
I am actually pretty crap at writing ASM but fairly good at reading source… most of the time when I want to do something, I find where TK has done something similar and then copy/paste it and change it to suit.
So, for something like what you want, I would first go have a look at how the mute track functions are implemented now… and here’s a block of code that actually does the work, which is used within the handler for the GP buttons when in the Mute screen:
CS_M_MUTE_GP_Callback_Mute
;; toggle mute flag
lfsr FSR1, SEQ_TRKS_MUTED0
btfsc MIOS_PARAMETER1, 3
movf POSTINC1, W ; increment pointer if track > 8
movf MIOS_PARAMETER1, W
call MIOS_HLP_GetBitORMask
xorwf INDF1, F
[/code]
So basically you need to write a set of 16 button handlers much like the way the SEQ_BUTTON_Track1 etc. buttons are defined in seq_buttons.inc.
Add the following code to seq_buttons.inc
[code]
SEQ\_BUTTON\_MuteTrack1
movlw 0
rgoto SEQ\_BUTTON\_MuteTrackx\_Cont
SEQ\_BUTTON\_MuteTrack2
movlw 1
rgoto SEQ\_BUTTON\_MuteTrackx\_Cont
SEQ\_BUTTON\_MuteTrack3
movlw 2
rgoto SEQ\_BUTTON\_MuteTrackx\_Cont
SEQ\_BUTTON\_MuteTrack4
movlw 3
rgoto SEQ\_BUTTON\_MuteTrackx\_Cont
SEQ\_BUTTON\_MuteTrack5
movlw 4
rgoto SEQ\_BUTTON\_MuteTrackx\_Cont
SEQ\_BUTTON\_MuteTrack6
movlw 5
rgoto SEQ\_BUTTON\_MuteTrackx\_Cont
SEQ\_BUTTON\_MuteTrack7
movlw 6
rgoto SEQ\_BUTTON\_MuteTrackx\_Cont
SEQ\_BUTTON\_MuteTrack8
movlw 7
rgoto SEQ\_BUTTON\_MuteTrackx\_Cont
SEQ\_BUTTON\_MuteTrack9
movlw 8
rgoto SEQ\_BUTTON\_MuteTrackx\_Cont
SEQ\_BUTTON\_MuteTrack10
movlw 9
rgoto SEQ\_BUTTON\_MuteTrackx\_Cont
SEQ\_BUTTON\_MuteTrack11
movlw 10
rgoto SEQ\_BUTTON\_MuteTrackx\_Cont
SEQ\_BUTTON\_MuteTrack12
movlw 11
rgoto SEQ\_BUTTON\_MuteTrackx\_Cont
SEQ\_BUTTON\_MuteTrack13
movlw 12
rgoto SEQ\_BUTTON\_MuteTrackx\_Cont
SEQ\_BUTTON\_MuteTrack14
movlw 13
rgoto SEQ\_BUTTON\_MuteTrackx\_Cont
SEQ\_BUTTON\_MuteTrack15
movlw 14
rgoto SEQ\_BUTTON\_MuteTrackx\_Cont
SEQ\_BUTTON\_MuteTrack16
movlw 15
;; rgoto SEQ\_BUTTON\_MuteTrackx\_Cont
SEQ\_BUTTON\_MuteTrackx\_Cont
movwf MIOS\_PARAMETER1
;; do nothing when button has been released
btfsc MIOS\_PARAMETER2, 0
return
;; toggle mute flag
lfsr FSR1, SEQ\_TRKS\_MUTED0
btfsc MIOS\_PARAMETER1, 3
movf POSTINC1, W ; increment pointer if track \> 8
movf MIOS\_PARAMETER1, W
call MIOS\_HLP\_GetBitORMask
xorwf INDF1, F
;; request display re-initialisation
bsf CS\_STAT, CS\_STAT\_DISPLAY\_INIT\_REQ
return
Then connect SEQ_BUTTON_MuteTrack1 etc. to buttons in the DIN entry table.
BTW I didn’t compile this code, and don’t know if it works, I provide it only as a starting point.
Note I took the mute function code out of cs_m_mute.inc instead of calling it directly because you said you didn’t want it to change to the mute screen.
If you are already in the mute screen when you press these mute track buttons, then the GP LEDs won’t update because I didn’t copy or call that code. You could get that to work too if you really wanted to, I just don’t have time to do it right now the best way would be to test if you’re in the Mute scree when you press the Mute Track buttons and then make the Mute Track buttons act like GP buttons 1-16 by calling the same GP button handler.
that would be also cool for the mb808 …but I also have no idea…I have still problems by programm a video recorder, but, hey when you have the code— I copy it from you ;D hehe