chriss Posted July 10, 2003 Report Share Posted July 10, 2003 Hello all,i build the stepC of the Mbsid (90% finished) and everthing is working. (i will do the report later in an other topic). Now i want add a button to control the sync of the Mbsid lfo, just like the lfo waveformbutton. One button and two leds (off,asn,allnote).How can i do that?thankschriss Quote Link to comment Share on other sites More sharing options...
TK. Posted July 14, 2003 Report Share Posted July 14, 2003 Hi Chriss,unfortunately such a modification requires a lot of small changes in different files. A more comfortable solution is not possible due to timing reasons.So: the LED status has to be saved in a temporary register.See cs_menu_leds.inc, search for "LFO waveform" -- there are still 3 bits free in TMP5 which could be used.Once this assignment has been made, you can access to this status register in cs_menu_io_tables.inc (take the last DOUT_ENTRY as example)In cs_menu_io_tables.inc you also have to call a function when the "sync" button has been pressed (see CS_MENU_BUTTON_LFO_Wav as example)search for "CS_MENU_BUTTON_LFO_Wav" in cs_menu_buttons.inc --- just copy & paste the function, rename the label to "...LFO_Sync" change the cursor position from 0x01 to 0x04Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
chriss Posted July 15, 2003 Author Report Share Posted July 15, 2003 Hello Thorsten,thanks a lot, i will try it later this day. chriss Quote Link to comment Share on other sites More sharing options...
chriss Posted July 16, 2003 Author Report Share Posted July 16, 2003 Hello Thorsten,so half of this little mod works so far, the button does what it should do. But not the leds though.i changed in cs_menu_leds.inc the file from;; TMP5[4..0]: LFO waveform call CS_MENU_MS_GetSIDBase call CS_MENU_Hlp_AddLFOOffset swapf INDF0, W andlw 0x07 call MIOS_HLP_GetBitORMask IFCLR INDF0, 0, movlw 0x00 movwf TMP5to;; TMP5[6..0]: LFO waveform call CS_MENU_MS_GetSIDBase call CS_MENU_Hlp_AddLFOOffset swapf INDF0, W andlw 0x07 call MIOS_HLP_GetBitORMask IFCLR INDF0, 0, movlw 0x00 movwf TMP5is that all?and in the cs_menu_io_tables.incDOUT_ENTRY TMP5, 0, 5, 1 ; LFO Sine LED DOUT_ENTRY TMP5, 1, 5, 0 ; LFO Triangle LED DOUT_ENTRY TMP5, 2, 4, 7 ; LFO Saw LED DOUT_ENTRY TMP5, 3, 4, 6 ; LFO Pulse LED DOUT_ENTRY TMP5, 4, 4, 5 ; LFO Random LED DOUT_ENTRY TMP5, 5, 4, 4 ; LFO Sync Asn DOUT_ENTRY TMP5, 6, 4, 3 ; LFO Sync Allthanks chrissBTW: Is "Lfo Random" not supported? in the menu the Lcd tells me "off"and the led does not light. Quote Link to comment Share on other sites More sharing options...
TK. Posted July 17, 2003 Report Share Posted July 17, 2003 Hi Chriss,Random LFO is one of the new features of the upcoming V1.5With "andlw 0x07" you've masked out the interesting bits. However, I would recomment following four lines after "movlw TMP5" of the original code: btfsc INDF0, LFO_MODE_SYNC bsf TMP5, 5 btfsc INDF0, LFO_MODE_SYNC_ALL bsf TMP5, 6(unfortunately the IFSET macro doesn't work with more than three parameters, therefore btfsc == bit test, skip if clear" has to be used without the macro)Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
chriss Posted July 19, 2003 Author Report Share Posted July 19, 2003 Hello Thorsten,thanks a lot, it works beautiful.Hope this mod makes sense!chriss 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.