jjonas Posted March 25, 2012 Report Share Posted March 25, 2012 Hi, I tried searching the forum for "button press delay", but didn't find an answer to my question, so here goes: My problem is that sometimes (too often) when I release a pressed button, the MBSID takes the release as a button press as well. I guess this has to do with the mechanical property of the springy buttons, so I was wondering if there is something I could do software-wise - basically change some number in a line of code, as I cannot really code anything myself - to increase the delay between button presses so that when the contact disc in the button is springing up and down during release, the MBSID would not interpret these as a button press. I don't know how much this delay is at the moment, but taking as reference ladyada's arduino button tutorial, a millisecond would seem like an ok delay..? http://www.ladyada.net/learn/arduino/lesson5.html (section 'Brooklyn Debounce') Quote Link to comment Share on other sites More sharing options...
m00dawg Posted March 25, 2012 Report Share Posted March 25, 2012 Perhaps you have used the wrong resistor value for your DIN modules? You can use multiple values but there is likely a range of values that would work best (I would stick to what is documented here. If you don't use resistors or use the wrong ones, you can have problems similar to what you are having (called debouncing). Quote Link to comment Share on other sites More sharing options...
nILS Posted March 25, 2012 Report Share Posted March 25, 2012 Have a look in the source code - there's a setting for the button debouncing. Raise that until it works as expected. Quote Link to comment Share on other sites More sharing options...
TK. Posted March 25, 2012 Report Share Posted March 25, 2012 MIOS provides software based debouncing which can be enabled with the MIOS_SRIO_DebounceSet function: http://www.ucapps.de/mios8_fun.html#MIOS_SRIO_DebounceSet In order to add this to the MBSID application, open src/main.inc, search for USER_Init, and write: USER_Init movlw 10 ; debounce for 10 mS call MIOS_SRIO_DebounceSet [/code] Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
jjonas Posted March 26, 2012 Author Report Share Posted March 26, 2012 Thanks for the replies! By MBSID application do you mean setup_6581.hex and setup8580.hex..? If so, I'm not sure of everything I need to do in order to compile the modified source successfully. I guess I have all the raw material from the midibox_sid_v2_0_rc38.zip, but from there on I'm not completely sure what I have to do. There's some advice in http://www.midibox.org/dokuwiki/application_development, but the most detailed advice seems to be for Windows, and I'm on Ubuntu 11.10. I have installed sdcc and gputils. Do I need to have MIOS sources as well (From http://svnmios.midibox.org/listing.php?repname=svn.mios&path=%2Ftrunk%2Fmios%2F)? Or if not, what is the advice for Ubuntu 8.04 referring to with MIOS_PATH="/YOUR/PATH/HERE/mios/trunk" MIOS_BIN_PATH="/YOUR/PATH/HERE/mios/trunk/bin" MIOS_SHELL="/bin/bash" There's a lot of stuff in the folder of the unzipped midibox_sid_v2_0_rc38.zip, how will make know what to do..? You bet these won't be the last questions, but thanks for your patience :-) Quote Link to comment Share on other sites More sharing options...
TK. Posted March 26, 2012 Report Share Posted March 26, 2012 Maybe it's too obvious: the release package can be compiled without setting environment variables. Just install gputils, thereafter type "make" in the main folder - thats all! Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
jjonas Posted March 27, 2012 Author Report Share Posted March 27, 2012 Success!!! Thanks! 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.