matoz Posted August 7, 2008 Report Share Posted August 7, 2008 Hello all! 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. ??? How must I do? ThanksMATOZ Quote Link to comment Share on other sites More sharing options...
matoz Posted August 7, 2008 Author Report Share Posted August 7, 2008 I think i just have to modify adress of "already existing mute buttons" to new mute buttons added? Quote Link to comment Share on other sites More sharing options...
stryd_one Posted August 7, 2008 Report Share Posted August 7, 2008 You're on the right track there. (pardon the pun) How must I do? You've got two options: Learn ASMHope someone volunteers ;) Quote Link to comment Share on other sites More sharing options...
matoz Posted August 8, 2008 Author Report Share Posted August 8, 2008 i think, if i want it before several years, i must choose the second option... ;) . But i will start to study ASM too...Is there a program witch can change ASM in C? Quote Link to comment Share on other sites More sharing options...
stryd_one Posted August 11, 2008 Report Share Posted August 11, 2008 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 :) Quote Link to comment Share on other sites More sharing options...
matoz Posted August 13, 2008 Author Report Share Posted August 13, 2008 Woh! :-X I tried it yesterday night, it is a "gaz factory"!!!I found that : (in french) http://benoit-m.developpez.com/assembleur/tutoriel/ They explain ASM language. And i saw there is a forum, perhaps they will be able to help me. Quote Link to comment Share on other sites More sharing options...
stryd_one Posted August 13, 2008 Report Share Posted August 13, 2008 You want Microchip PIC16 ASM, aka PIC ASM. I think that's not the right page for you :(Try piclist.com , that's always a good starting point. Also be sure to get the datasheet like I said. That's where it's all explained. Quote Link to comment Share on other sites More sharing options...
matoz Posted August 14, 2008 Author Report Share Posted August 14, 2008 Ah yes, it is not simple.Is there a spécific ASM language for each chip?? ??? Quote Link to comment Share on other sites More sharing options...
stryd_one Posted August 14, 2008 Report Share Posted August 14, 2008 Is there a spécific ASM language for each chip?Yes. 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. Quote Link to comment Share on other sites More sharing options...
moogah Posted August 14, 2008 Report Share Posted August 14, 2008 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 :) Quote Link to comment Share on other sites More sharing options...
Wilba Posted August 15, 2008 Report Share Posted August 15, 2008 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_ContSEQ_BUTTON_MuteTrack2 movlw 1 rgoto SEQ_BUTTON_MuteTrackx_ContSEQ_BUTTON_MuteTrack3 movlw 2 rgoto SEQ_BUTTON_MuteTrackx_ContSEQ_BUTTON_MuteTrack4 movlw 3 rgoto SEQ_BUTTON_MuteTrackx_ContSEQ_BUTTON_MuteTrack5 movlw 4 rgoto SEQ_BUTTON_MuteTrackx_ContSEQ_BUTTON_MuteTrack6 movlw 5 rgoto SEQ_BUTTON_MuteTrackx_ContSEQ_BUTTON_MuteTrack7 movlw 6 rgoto SEQ_BUTTON_MuteTrackx_ContSEQ_BUTTON_MuteTrack8 movlw 7 rgoto SEQ_BUTTON_MuteTrackx_ContSEQ_BUTTON_MuteTrack9 movlw 8 rgoto SEQ_BUTTON_MuteTrackx_ContSEQ_BUTTON_MuteTrack10 movlw 9 rgoto SEQ_BUTTON_MuteTrackx_ContSEQ_BUTTON_MuteTrack11 movlw 10 rgoto SEQ_BUTTON_MuteTrackx_ContSEQ_BUTTON_MuteTrack12 movlw 11 rgoto SEQ_BUTTON_MuteTrackx_ContSEQ_BUTTON_MuteTrack13 movlw 12 rgoto SEQ_BUTTON_MuteTrackx_ContSEQ_BUTTON_MuteTrack14 movlw 13 rgoto SEQ_BUTTON_MuteTrackx_ContSEQ_BUTTON_MuteTrack15 movlw 14 rgoto SEQ_BUTTON_MuteTrackx_ContSEQ_BUTTON_MuteTrack16 movlw 15 ;; rgoto SEQ_BUTTON_MuteTrackx_ContSEQ_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. Quote Link to comment Share on other sites More sharing options...
stryd_one Posted August 15, 2008 Report Share Posted August 15, 2008 And if that ain't enough incentive to learn ASM, nothing is! Quote Link to comment Share on other sites More sharing options...
Phattline Posted August 15, 2008 Report Share Posted August 15, 2008 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 Quote Link to comment Share on other sites More sharing options...
matoz Posted August 22, 2008 Author Report Share Posted August 22, 2008 Ok, many thanks for your quotes, they are helpful.I have now directions to understand ASM world.But i have one question:There is no Make.bat, how recompil all files to make 1 .hex file, ? Quote Link to comment Share on other sites More sharing options...
stryd_one Posted August 22, 2008 Report Share Posted August 22, 2008 wiki - search - toolchain ;)We use make (the tool, IE make.exe) now. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.