moxi Posted July 14, 2006 Report Share Posted July 14, 2006 Hi,someone can help me for that: i'm trying to implement the 8*8 matrix (sm simple v1)on a seq running on pic18f4620.what i've already done:i've keep the gp button (integated with encoders), and the matrix button simply call the appropriate track:code at the end of sm_simple.inc: (the resulting buton number saved in mios_parameter3)SM_NotifyToggle ;; MEMO: here you could also branch directly to USER_DIN_NotifyToggle in order ;; to emulate buttons which are connected on the common way to the shift registers ;; -> goto SEQ_BUTTON_GP_Cont_Trk1SEQ_BUTTON_GP_Cont_Trk1 is located in "seq_button.inc":code:SEQ_BUTTON_GP_Cont_Trk1 movlw 16 CPFSLT MIOS_PARAMETER3 goto SEQ_BUTTON_GP_Cont_Trk2 movwf MIOS_PARAMETER3 movlw 1 << 0 ; select first track movwf SEQ_SELECTED_TRKS, BANKED goto SEQ_GP_Button SEQ_BUTTON_GP_Cont_Trk2 movlw 32 CPFSLT MIOS_PARAMETER3, BANKED goto SEQ_BUTTON_GP_Cont_Trk3 ;; for GP17..31 movwf MIOS_PARAMETER3 movlw 1 << 1 ; select second track movwf SEQ_SELECTED_TRKS, BANKED goto SEQ_GP_ButtonSEQ_BUTTON_GP_Cont_Trk3 movlw 48 CPFSLT MIOS_PARAMETER3, BANKED goto SEQ_BUTTON_GP_Cont_Trk4 ;; for GP32..47 movwf MIOS_PARAMETER3 movlw 1 << 2 ; select third track movwf SEQ_SELECTED_TRKS, BANKED goto SEQ_GP_ButtonSEQ_BUTTON_GP_Cont_Trk4 ;; for GP48..63 movwf MIOS_PARAMETER3 movlw 1 << 3 ; select forth track movwf SEQ_SELECTED_TRKS, BANKED goto SEQ_GP_Button;; ------------------------------------------------------------but when compiling, i obtain the error "overwritting previous adress content" a lot of times at lines 41,85,165 and 170 in "mios_table"..... Quote Link to comment Share on other sites More sharing options...
TK. Posted July 14, 2006 Report Share Posted July 14, 2006 Maybe you need to select the right PIC in the mios.h file?Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
moxi Posted July 14, 2006 Author Report Share Posted July 14, 2006 that's done! and the right pic is selected for the assembler.. Quote Link to comment Share on other sites More sharing options...
TK. Posted July 14, 2006 Report Share Posted July 14, 2006 Maybe you've added something to mios_tables.inc, so that the tables don't match into the small address space between 0x3082 and 0x327f anymore.However, thanks to MIOS V1.9, these tables could now be located outside mios_tables.inc again (it was the only trick I found out to add some more code)Especially with the PIC18F4620 there is no memory issue anymore, so ... just put the DIN and DOUT tables into a new .inc file :)Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
moxi Posted July 14, 2006 Author Report Share Posted July 14, 2006 i'm working with the original mios_table file ??? Quote Link to comment Share on other sites More sharing options...
TK. Posted July 14, 2006 Report Share Posted July 14, 2006 Did you include sm_simple.inc before or after mios_tables.inc?Normaly it should be added at the end of main.asm (e.g. below the "reusable utility functions" comment) to avoid address conflictsBest Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
moxi Posted July 14, 2006 Author Report Share Posted July 14, 2006 :) :) :)solved! :o :o :oi will test with hardware tomorrow!the file sm_simple was defined before mios_table...thanks TK Quote Link to comment Share on other sites More sharing options...
moxi Posted July 14, 2006 Author Report Share Posted July 14, 2006 and the compilation works for pic18F452 too! Quote Link to comment Share on other sites More sharing options...
stryd_one Posted July 14, 2006 Report Share Posted July 14, 2006 niiiiiice :)We're all watching you moxi :D Quote Link to comment Share on other sites More sharing options...
moxi Posted July 15, 2006 Author Report Share Posted July 15, 2006 the first progs doesn't work at all...:-Xdon't keep it at example, for the while the buton trig step of different track ,but not the appr. ones....i go back to work on this... Quote Link to comment Share on other sites More sharing options...
moxi Posted July 15, 2006 Author Report Share Posted July 15, 2006 i've done that:SEQ_BUTTON_GP_Cont_Trk1 movlw 8 CPFSLT MIOS_PARAMETER3, BANKED goto SEQ_BUTTON_GP_Cont_Trk2 ;; for GP0..7 movff MIOS_PARAMETER3, MIOS_PARAMETER1 movlw 1 << 0 ; select first track movwf SEQ_SELECTED_TRKS, BANKED goto SEQ_GP_ButtonSEQ_BUTTON_GP_Cont_Trk2 movlw 16 CPFSLT MIOS_PARAMETER3, BANKED goto SEQ_BUTTON_GP_Cont_Trk1_2 ;; for GP8..15 movlw 0x08 SUBWF MIOS_PARAMETER3, 1 movff MIOS_PARAMETER3, MIOS_PARAMETER1 movlw 1 << 1 ; select second track movwf SEQ_SELECTED_TRKS, BANKED goto SEQ_GP_ButtonSEQ_BUTTON_GP_Cont_Trk3 movlw 24 CPFSLT MIOS_PARAMETER3, BANKED goto SEQ_BUTTON_GP_Cont_Trk4 ;; for GP16..23 movlw 16 SUBWF MIOS_PARAMETER3, 1 movff MIOS_PARAMETER3, MIOS_PARAMETER1 movlw 1 << 2 ; select third track movwf SEQ_SELECTED_TRKS, BANKED goto SEQ_GP_ButtonSEQ_BUTTON_GP_Cont_Trk4 movlw 32 CPFSLT MIOS_PARAMETER3, BANKED goto SEQ_BUTTON_GP_Cont_Trk1_2 ;; for GP24..32 movlw 24 SUBWF MIOS_PARAMETER3, 1 movff MIOS_PARAMETER3, MIOS_PARAMETER1 movwf MIOS_PARAMETER3 movlw 1 << 3 ; select forth track movwf SEQ_SELECTED_TRKS, BANKED goto SEQ_GP_ButtonSEQ_BUTTON_GP_Cont_Trk1_2 movlw 40 CPFSLT MIOS_PARAMETER3, BANKED goto SEQ_BUTTON_GP_Cont_Trk2_2 ;; for GP32..39 movlw 24 SUBWF MIOS_PARAMETER3, 1 movff MIOS_PARAMETER3, MIOS_PARAMETER1 movlw 1 << 0 ; select first track movwf SEQ_SELECTED_TRKS, BANKED goto SEQ_GP_ButtonSEQ_BUTTON_GP_Cont_Trk2_2 movlw 48 CPFSLT MIOS_PARAMETER3, BANKED goto SEQ_BUTTON_GP_Cont_Trk3_2 ;; for GP40..47 movlw 32 SUBWF MIOS_PARAMETER3, 1 movff MIOS_PARAMETER3, MIOS_PARAMETER1 movlw 1 << 1 ; select second track movwf SEQ_SELECTED_TRKS, BANKED goto SEQ_GP_ButtonSEQ_BUTTON_GP_Cont_Trk3_2 movlw 56 CPFSLT MIOS_PARAMETER3, BANKED goto SEQ_BUTTON_GP_Cont_Trk4_2 ;; for GP48..55 movlw 40 SUBWF MIOS_PARAMETER3, 1 movff MIOS_PARAMETER3, MIOS_PARAMETER1 movlw 1 << 2 ; select third track movwf SEQ_SELECTED_TRKS, BANKED goto SEQ_GP_ButtonSEQ_BUTTON_GP_Cont_Trk4_2 ;; for GP56..64 movlw 48 SUBWF MIOS_PARAMETER3, 1 movff MIOS_PARAMETER3, MIOS_PARAMETER1 movlw 1 << 3 ; select forth track movwf SEQ_SELECTED_TRKS, BANKED goto SEQ_GP_Buttonbut only the eight first butons work properly, other buttons trig step but not the right ones...any suggestions? Quote Link to comment Share on other sites More sharing options...
moxi Posted July 15, 2006 Author Report Share Posted July 15, 2006 too much complicate for me...i've connected the other butons and now only the first buton of the matrix work!!!.... Quote Link to comment Share on other sites More sharing options...
TK. Posted July 15, 2006 Report Share Posted July 15, 2006 You could build some debugging code into your modifications in order to debug this.Simplest solution: just send a MIDI event which contains the button number and the value, e.g. B0 <button> <value>But remember: MIOS_MIDI* will change the BSR, it has to be changed back to "SET_BSR SEQ_BASE" after the MIOS_MIDI_TxBufferPut functions have been calledBest Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
moxi Posted July 16, 2006 Author Report Share Posted July 16, 2006 ...sorry ,too much bugs i don't understand (e.g. the first line always enable steps of the selected tracks...the fourth buton of each row invert all the step...and not sure of the reliability of my matrix)... i will try with connecting directly the 64 buttons to individual pins....the code will be more simplei'm a simple man...i don't like complication...(as say the song)thanks for your help... Quote Link to comment Share on other sites More sharing options...
TK. Posted July 16, 2006 Report Share Posted July 16, 2006 If you want to keep it simple, then just write:SM_NotifyToggle ;; button number (0x00..0x3f) in MIOS_PARAMETER1 ;; the selected track is: MIOS_PARAMETER1[5:4] swapf MIOS_PARAMETER1, W andlw 0x03 call MIOS_HLP_GetBitORMask ; each track has a dedicated bit, use the OR mask pattern for conversion iorlw 0xf0 ; (for track button hold detection bit 7-4 must be 0xf!) SET_BSR SEQ_BASE movwf SEQ_SELECTED_TRKS, BANKED ;; the GP button number is MIOS_PARAMETER1[3:0], we can mask this: movlw 0x0f andwf MIOS_PARAMETER1, F ;; branch to GP button handler goto SEQ_GP_Button [/code](I haven't tried this code, propably you need to debug a little)Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
moxi Posted July 16, 2006 Author Report Share Posted July 16, 2006 thank!i've unmount the first half of my matrix and get success with buttons directly connected.i go re-re-re-connect ;D the second half of the matrix in order to test your code (with only 4 row of 8 buttons, but i suppose it will be suffisant to test it), so this brainstorm won't be for nothing and i will publish here the code for the two options... Quote Link to comment Share on other sites More sharing options...
moxi Posted July 16, 2006 Author Report Share Posted July 16, 2006 Don't work at all for the while, nothing is happening when pushing matrix buton... Quote Link to comment Share on other sites More sharing options...
TK. Posted July 16, 2006 Report Share Posted July 16, 2006 So, you haven't built in the debug code like proposed above? (Sending MIDI events to display which button has been pressed...)Without such informations (saying "nothing happens") your comment is useless ;-)Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
moxi Posted July 16, 2006 Author Report Share Posted July 16, 2006 i've inserted the code from the sm_simple app to send note, before the code you give to me, but really nothing happens, no note and no step triggered..i've done the same thing with my first bugged programmation and even if the wrong step are triggered, midi notes are outputed, but its the same note for all buttons: c#1... Quote Link to comment Share on other sites More sharing options...
TK. Posted July 16, 2006 Report Share Posted July 16, 2006 So, the scan matrix sends MIDI events when you are running the example application sm_example1 stand alone, but it doesn't work when you are using the sm_simple.inc inside the MBSEQ application?Seems, that you forgot to insert the hooks into main.asm? (see the header of sm_simple.inc, examples can be found in the main.asm of sm_example1)Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
moxi Posted July 16, 2006 Author Report Share Posted July 16, 2006 :)yes you're right, i have forgot one of the hooks... Quote Link to comment Share on other sites More sharing options...
moxi Posted July 16, 2006 Author Report Share Posted July 16, 2006 that's working, i've just swapped some rows , but when pressing play, the screen jump from one track to other at a high rate... i think it's caused by some bad buttons... Quote Link to comment Share on other sites More sharing options...
moxi Posted July 17, 2006 Author Report Share Posted July 17, 2006 my matrix work too badly for doing a serious debugging..but i can publish now the mods for using 64 butons directly connected .sorry if my programmation is not really optimised, but it's working.first, in mios_table.inc, add entry for the 64 butons after the original buttons: DIN_ENTRY SEQ_BUTTON1_gp1, 1, 0 DIN_ENTRY SEQ_BUTTON1_gp2, 1, 1 DIN_ENTRY SEQ_BUTTON1_gp3, 1, 2 DIN_ENTRY SEQ_BUTTON1_gp4, 1, 3 DIN_ENTRY SEQ_BUTTON1_gp5, 1, 4 DIN_ENTRY SEQ_BUTTON1_gp6, 1, 5 DIN_ENTRY SEQ_BUTTON1_gp7, 1, 6 DIN_ENTRY SEQ_BUTTON1_gp8, 1, 7 DIN_ENTRY SEQ_BUTTON1_gp9, 2, 0 DIN_ENTRY SEQ_BUTTON1_gp10, 2, 1 DIN_ENTRY SEQ_BUTTON1_gp11, 2, 2 DIN_ENTRY SEQ_BUTTON1_gp12, 2, 3 DIN_ENTRY SEQ_BUTTON1_gp13, 2, 4 DIN_ENTRY SEQ_BUTTON1_gp14, 2, 5 DIN_ENTRY SEQ_BUTTON1_gp15, 2, 6 DIN_ENTRY SEQ_BUTTON1_gp16, 2, 7 DIN_ENTRY SEQ_BUTTON2_gp1, 3, 0 DIN_ENTRY SEQ_BUTTON2_gp2, 3, 1 DIN_ENTRY SEQ_BUTTON2_gp3, 3, 2 DIN_ENTRY SEQ_BUTTON2_gp4, 3, 3 DIN_ENTRY SEQ_BUTTON2_gp5, 3, 4 DIN_ENTRY SEQ_BUTTON2_gp6, 3, 5 DIN_ENTRY SEQ_BUTTON2_gp7, 3, 6 DIN_ENTRY SEQ_BUTTON2_gp8, 3, 7 DIN_ENTRY SEQ_BUTTON2_gp9, 4, 0 DIN_ENTRY SEQ_BUTTON2_gp10, 4, 1 DIN_ENTRY SEQ_BUTTON2_gp11, 4, 2 DIN_ENTRY SEQ_BUTTON2_gp12, 4, 3 DIN_ENTRY SEQ_BUTTON2_gp13, 4, 4 DIN_ENTRY SEQ_BUTTON2_gp14, 4, 5 DIN_ENTRY SEQ_BUTTON2_gp15, 4, 6 DIN_ENTRY SEQ_BUTTON2_gp16, 4, 7 DIN_ENTRY SEQ_BUTTON3_gp1, 5, 0 DIN_ENTRY SEQ_BUTTON3_gp2, 5, 1 DIN_ENTRY SEQ_BUTTON3_gp3, 5, 2 DIN_ENTRY SEQ_BUTTON3_gp4, 5, 3 DIN_ENTRY SEQ_BUTTON3_gp5, 5, 4 DIN_ENTRY SEQ_BUTTON3_gp6, 5, 5 DIN_ENTRY SEQ_BUTTON3_gp7, 5, 6 DIN_ENTRY SEQ_BUTTON3_gp8, 5, 7 DIN_ENTRY SEQ_BUTTON3_gp9, 6, 0 DIN_ENTRY SEQ_BUTTON3_gp10, 6, 1 DIN_ENTRY SEQ_BUTTON3_gp11, 6, 2 DIN_ENTRY SEQ_BUTTON3_gp12, 6, 3 DIN_ENTRY SEQ_BUTTON3_gp13, 6, 4 DIN_ENTRY SEQ_BUTTON3_gp14, 6, 5 DIN_ENTRY SEQ_BUTTON3_gp15, 6, 6 DIN_ENTRY SEQ_BUTTON3_gp16, 6, 7 DIN_ENTRY SEQ_BUTTON4_gp1, 7, 0 DIN_ENTRY SEQ_BUTTON4_gp2, 7, 1 DIN_ENTRY SEQ_BUTTON4_gp3, 7, 2 DIN_ENTRY SEQ_BUTTON4_gp4, 7, 3 DIN_ENTRY SEQ_BUTTON4_gp5, 7, 4 DIN_ENTRY SEQ_BUTTON4_gp6, 7, 5 DIN_ENTRY SEQ_BUTTON4_gp7, 7, 6 DIN_ENTRY SEQ_BUTTON4_gp8, 7, 7 DIN_ENTRY SEQ_BUTTON4_gp9, 8, 0 DIN_ENTRY SEQ_BUTTON4_gp10, 8, 1 DIN_ENTRY SEQ_BUTTON4_gp11, 8, 2 DIN_ENTRY SEQ_BUTTON4_gp12, 8, 3 DIN_ENTRY SEQ_BUTTON4_gp13, 8, 4 DIN_ENTRY SEQ_BUTTON4_gp14, 8, 5 DIN_ENTRY SEQ_BUTTON4_gp15, 8, 6 DIN_ENTRY SEQ_BUTTON4_gp16, 8, 7then , you have to set in main.asm the gp-butons SR on 0:; Some menus are provide the possibility to use 16 "general purpose" buttons; Define the two shift registers which are assigned to this function here:; (valid numbers: 1-16)#define DEFAULT_GP_DIN_SR0 0 ; first GP DIN shift register not assigned #define DEFAULT_GP_DIN_SR1 0 ; second GP DIN shift register not assigned the gp butons still work with the menu buton: you can press any button of any rows. if the menu page called is relative to track number, pressing e.g. gp buton "event" of row 1 will make the menu jump to "event" for track one, if you press gp buton "event" of row 2, to "event" of track 2... then, in "seq_buttons.inc", add this code after this lines:...SEQ_BUTTON_GP_Cont movwf MIOS_PARAMETER1 goto SEQ_GP_Button :;; --------------------------------------------------------------------------------------------SEQ_BUTTON1_gp1 movlw 0x00 rgoto SEQ_BUTTON_GP_Cont_1SEQ_BUTTON1_gp2 movlw 0x01 rgoto SEQ_BUTTON_GP_Cont_1SEQ_BUTTON1_gp3 movlw 0x02 rgoto SEQ_BUTTON_GP_Cont_1SEQ_BUTTON1_gp4 movlw 0x03 rgoto SEQ_BUTTON_GP_Cont_1SEQ_BUTTON1_gp5 movlw 0x04 rgoto SEQ_BUTTON_GP_Cont_1SEQ_BUTTON1_gp6 movlw 0x05 rgoto SEQ_BUTTON_GP_Cont_1SEQ_BUTTON1_gp7 movlw 0x06 rgoto SEQ_BUTTON_GP_Cont_1SEQ_BUTTON1_gp8 movlw 0x07 rgoto SEQ_BUTTON_GP_Cont_1SEQ_BUTTON1_gp9 movlw 0x08 rgoto SEQ_BUTTON_GP_Cont_1SEQ_BUTTON1_gp10 movlw 0x09 rgoto SEQ_BUTTON_GP_Cont_1SEQ_BUTTON1_gp11 movlw 0x0a rgoto SEQ_BUTTON_GP_Cont_1SEQ_BUTTON1_gp12 movlw 0x0b rgoto SEQ_BUTTON_GP_Cont_1SEQ_BUTTON1_gp13 movlw 0x0c rgoto SEQ_BUTTON_GP_Cont_1SEQ_BUTTON1_gp14 movlw 0x0d rgoto SEQ_BUTTON_GP_Cont_1SEQ_BUTTON1_gp15 movlw 0x0e rgoto SEQ_BUTTON_GP_Cont_1SEQ_BUTTON1_gp16 movlw 0x0f rgoto SEQ_BUTTON_GP_Cont_1;; ----------------------------------------------------------------------------------------SEQ_BUTTON2_gp1 movlw 0x00 rgoto SEQ_BUTTON_GP_Cont_2SEQ_BUTTON2_gp2 movlw 0x01 rgoto SEQ_BUTTON_GP_Cont_2SEQ_BUTTON2_gp3 movlw 0x02 rgoto SEQ_BUTTON_GP_Cont_2SEQ_BUTTON2_gp4 movlw 0x03 rgoto SEQ_BUTTON_GP_Cont_2SEQ_BUTTON2_gp5 movlw 0x04 rgoto SEQ_BUTTON_GP_Cont_2SEQ_BUTTON2_gp6 movlw 0x05 rgoto SEQ_BUTTON_GP_Cont_2SEQ_BUTTON2_gp7 movlw 0x06 rgoto SEQ_BUTTON_GP_Cont_2SEQ_BUTTON2_gp8 movlw 0x07 rgoto SEQ_BUTTON_GP_Cont_2SEQ_BUTTON2_gp9 movlw 0x08 rgoto SEQ_BUTTON_GP_Cont_2SEQ_BUTTON2_gp10 movlw 0x09 rgoto SEQ_BUTTON_GP_Cont_2SEQ_BUTTON2_gp11 movlw 0x0a rgoto SEQ_BUTTON_GP_Cont_2SEQ_BUTTON2_gp12 movlw 0x0b rgoto SEQ_BUTTON_GP_Cont_2SEQ_BUTTON2_gp13 movlw 0x0c rgoto SEQ_BUTTON_GP_Cont_2SEQ_BUTTON2_gp14 movlw 0x0d rgoto SEQ_BUTTON_GP_Cont_2SEQ_BUTTON2_gp15 movlw 0x0e rgoto SEQ_BUTTON_GP_Cont_2SEQ_BUTTON2_gp16 movlw 0x0f rgoto SEQ_BUTTON_GP_Cont_2;; -------------------------------------------------------------------------------------------SEQ_BUTTON3_gp1 movlw 0x00 rgoto SEQ_BUTTON_GP_Cont_3SEQ_BUTTON3_gp2 movlw 0x01 rgoto SEQ_BUTTON_GP_Cont_3SEQ_BUTTON3_gp3 movlw 0x02 rgoto SEQ_BUTTON_GP_Cont_3SEQ_BUTTON3_gp4 movlw 0x03 rgoto SEQ_BUTTON_GP_Cont_3SEQ_BUTTON3_gp5 movlw 0x04 rgoto SEQ_BUTTON_GP_Cont_3SEQ_BUTTON3_gp6 movlw 0x05 rgoto SEQ_BUTTON_GP_Cont_3SEQ_BUTTON3_gp7 movlw 0x06 rgoto SEQ_BUTTON_GP_Cont_3SEQ_BUTTON3_gp8 movlw 0x07 rgoto SEQ_BUTTON_GP_Cont_3SEQ_BUTTON3_gp9 movlw 0x08 rgoto SEQ_BUTTON_GP_Cont_3SEQ_BUTTON3_gp10 movlw 0x09 rgoto SEQ_BUTTON_GP_Cont_3SEQ_BUTTON3_gp11 movlw 0x0a rgoto SEQ_BUTTON_GP_Cont_3SEQ_BUTTON3_gp12 movlw 0x0b rgoto SEQ_BUTTON_GP_Cont_3SEQ_BUTTON3_gp13 movlw 0x0c rgoto SEQ_BUTTON_GP_Cont_3SEQ_BUTTON3_gp14 movlw 0x0d rgoto SEQ_BUTTON_GP_Cont_3SEQ_BUTTON3_gp15 movlw 0x0e rgoto SEQ_BUTTON_GP_Cont_3SEQ_BUTTON3_gp16 movlw 0x0f rgoto SEQ_BUTTON_GP_Cont_3;; -------------------------------------------------------------------------------------------SEQ_BUTTON4_gp1 movlw 0x00 rgoto SEQ_BUTTON_GP_Cont_4SEQ_BUTTON4_gp2 movlw 0x01 rgoto SEQ_BUTTON_GP_Cont_4SEQ_BUTTON4_gp3 movlw 0x02 rgoto SEQ_BUTTON_GP_Cont_4SEQ_BUTTON4_gp4 movlw 0x03 rgoto SEQ_BUTTON_GP_Cont_4SEQ_BUTTON4_gp5 movlw 0x04 rgoto SEQ_BUTTON_GP_Cont_4SEQ_BUTTON4_gp6 movlw 0x05 rgoto SEQ_BUTTON_GP_Cont_4SEQ_BUTTON4_gp7 movlw 0x06 rgoto SEQ_BUTTON_GP_Cont_4SEQ_BUTTON4_gp8 movlw 0x07 rgoto SEQ_BUTTON_GP_Cont_4SEQ_BUTTON4_gp9 movlw 0x08 rgoto SEQ_BUTTON_GP_Cont_4SEQ_BUTTON4_gp10 movlw 0x09 rgoto SEQ_BUTTON_GP_Cont_4SEQ_BUTTON4_gp11 movlw 0x0a rgoto SEQ_BUTTON_GP_Cont_4SEQ_BUTTON4_gp12 movlw 0x0b rgoto SEQ_BUTTON_GP_Cont_4SEQ_BUTTON4_gp13 movlw 0x0c rgoto SEQ_BUTTON_GP_Cont_4SEQ_BUTTON4_gp14 movlw 0x0d rgoto SEQ_BUTTON_GP_Cont_4SEQ_BUTTON4_gp15 movlw 0x0e rgoto SEQ_BUTTON_GP_Cont_4SEQ_BUTTON4_gp16 movlw 0x0f rgoto SEQ_BUTTON_GP_Cont_4;; ------------------------------------------------------------------------------SEQ_BUTTON_GP_Cont_1 ;; was the SEQ_BUTTON_GP_Cont before movwf MIOS_PARAMETER1 SET_BSR SEQ_BASE movlw 1 << 0 ; select first track movwf SEQ_SELECTED_TRKS, BANKED goto SEQ_GP_Button SEQ_BUTTON_GP_Cont_2 ;; for GP17..31 movwf MIOS_PARAMETER1 SET_BSR SEQ_BASE movlw 1 << 1 ; select second track movwf SEQ_SELECTED_TRKS, BANKED goto SEQ_GP_ButtonSEQ_BUTTON_GP_Cont_3 ;; for GP32..47 movwf MIOS_PARAMETER1 movlw 1 << 2 ; select third track movwf SEQ_SELECTED_TRKS, BANKED goto SEQ_GP_ButtonSEQ_BUTTON_GP_Cont_4 ;; for GP48..63 movwf MIOS_PARAMETER1 movlw 1 << 3 ; select forth track movwf SEQ_SELECTED_TRKS, BANKED goto SEQ_GP_Button;; --------------------------------------------------------------------------that's all.i'm sure anyone can do simpler or much effective, but this work...i will tell you if there is any side effect as soon as the whole hardware will be build.TK: i promise you to build another matrix to seriously test your code , so you don't spend time for me for nothing... 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.