cosmosuave Posted March 5, 2008 Report Share Posted March 5, 2008 Ok I almost have my STereo Sid complete... I have done the following...Loaded http://www.ucapps.de/mios/midibox_sid_v2_0_rc17.zip and getting the following default Lead Patch and have audio output...My 2x40 LCD is behaving as a 2x20 LCD and I did read that I may have to change code is this correct?Also I am using 10 buttons to in conjunction with 2x40 LCD for the parameters... I found somewhere that the code has to be changed from 5 -10 buttons...in main.asm, you have to set "CS_MENU_DISPLAYED_ITEMS 10" Is the main asm for this file---->midibox_sid_v2_0_rc17My encoder seems to work but it only searching for other connected SIDS with the following mssg SID2 not available CAN disabledMy Shift up button will give me the ADSR parameters but I cannot back out... Upon reading there is a test app to check DIN controls... Is this the file to use midio128_v2_1e.zip to check all buttons and encoder?I'm stoked that I am close to done but a little lost on getting to the finish line... In the meantime I'll keep sleuthing...Bankstik is now working...Thanks... Quote Link to comment Share on other sites More sharing options...
Wilba Posted March 6, 2008 Report Share Posted March 6, 2008 It sounds like you've connected switches and encoders to the DIN inputs and not changed the pin assignments in the .asm file to match. So your encoder is connected to the default pin assignments for the SID 1,2,3,4 buttons.How have you connected the switches, encoder (and LEDs, if any) to the DIN/DOUT pins?The "setup_8580.asm" (preferred starting point for you, I think) will be using the default pin assignments as show here: (see PDFs at bottom of this page):http://www.ucapps.de/midibox_sid_manual_hw.htmlYou should modify this file and change:#define CS_MENU_DISPLAYED_ITEMS 5 to #define CS_MENU_DISPLAYED_ITEMS 10 Ignore: ;; NOTE: if CS_MENU_DISPLAYED_ITEMS > 5, you have to adapt the DIN settings ;; in cs_menu_io_tables.inc[/code] as you now configure it in the setup_8580.asm file. Scroll down to: [code]CS_MENU_DIN_TABLE ;; Function name SR# Pin# DIN_ENTRY CS_MENU_BUTTON_Dec, 1, 0 ; only valid if rotary encoder not assigned to these pins DIN_ENTRY CS_MENU_BUTTON_Inc, 1, 1 ; (see mios_tables.inc) and CS_MENU_USE_INCDEC_BUTTONS == 1 DIN_ENTRY CS_MENU_BUTTON_Exec, 1, 2 DIN_ENTRY CS_MENU_BUTTON_Sel1, 1, 7 DIN_ENTRY CS_MENU_BUTTON_Sel2, 1, 6 DIN_ENTRY CS_MENU_BUTTON_Sel3, 1, 5 DIN_ENTRY CS_MENU_BUTTON_Sel4, 1, 4 DIN_ENTRY CS_MENU_BUTTON_Sel5, 1, 3 DIN_ENTRY CS_MENU_BUTTON_Sel6, 0, 0 ; define this if CS_MENU_DISPLAYED_ITEMS > 5 DIN_ENTRY CS_MENU_BUTTON_Sel7, 0, 0 ; define this if CS_MENU_DISPLAYED_ITEMS > 5 DIN_ENTRY CS_MENU_BUTTON_Sel8, 0, 0 ; define this if CS_MENU_DISPLAYED_ITEMS > 5 DIN_ENTRY CS_MENU_BUTTON_Sel9, 0, 0 ; define this if CS_MENU_DISPLAYED_ITEMS > 5 DIN_ENTRY CS_MENU_BUTTON_Sel10, 0, 0 ; define this if CS_MENU_DISPLAYED_ITEMS > 5... and change the "SR#" and "Pin" to match your pin assignments. You can compare how these match the default DIN assignments in the PDF (i.e. to understand how "SH#" and "Pin" relates to a pin on the DIN module). For buttons you don't have connected (i.e. perhaps "SID 1" and others in the rest of the table), set SR# and Pin to 0 each (like the default for CS_MENU_BUTTON_Sel6). Now scroll down further: MIOS_ENC_PIN_TABLE ;; SR Pin Mode#if CS_MENU_USE_INCDEC_BUTTONS == 0 ENC_ENTRY 1, 0, MIOS_ENC_MODE_DETENTED2 ; menu encoder#endif ;; additional CS encoders ;; SR Pin Mode ENC_ENTRY 3, 0, MIOS_ENC_MODE_DETENTED2 ; Osc delay/transpose/assign #1 ENC_ENTRY 3, 2, MIOS_ENC_MODE_DETENTED2 ; Osc attack/finetune/assign #2 ENC_ENTRY 3, 4, MIOS_ENC_MODE_DETENTED2 ; Osc decay/portamento/assign #3 ENC_ENTRY 3, 6, MIOS_ENC_MODE_DETENTED2 ; Osc sustain/release/assign #4 ENC_ENTRY 3, 8, MIOS_ENC_MODE_DETENTED2 ; Osc release/pulsewidth/assign #5 ENC_ENTRY 4, 6, MIOS_ENC_MODE_DETENTED2 ; LFO rate ENC_ENTRY 5, 0, MIOS_ENC_MODE_DETENTED2 ; LFO depth ENC_ENTRY 5, 4, MIOS_ENC_MODE_DETENTED2 ; Filter CutOff ENC_ENTRY 5, 6, MIOS_ENC_MODE_DETENTED2 ; Filter Resonance ENC_ENTRY 6, 0, MIOS_ENC_MODE_DETENTED2 ; Env depth/assign #1 ENC_ENTRY 6, 2, MIOS_ENC_MODE_DETENTED2 ; Env attack/assign #2 ENC_ENTRY 6, 4, MIOS_ENC_MODE_DETENTED2 ; Env decay/assign #3 ENC_ENTRY 6, 6, MIOS_ENC_MODE_DETENTED2 ; Env sustain/assign #4 ENC_ENTRY 7, 0, MIOS_ENC_MODE_DETENTED2 ; Env release/assign #5 ;; don't remove this "end-of-table" entry! ENC_EOT[/code] This is where encoders are mapped to DIN pins. Change the first one's SR and pin numbers: [code]#if CS_MENU_USE_INCDEC_BUTTONS == 0 ENC_ENTRY 1, 0, MIOS_ENC_MODE_DETENTED2 ; menu encoder#endifto match where you've connected the menu encoder.I'm assuming you can do the same trick and assign SR=0, Pin=0 to the other ones which you are not using, in case you're using a 3rd DIN shift register (i.e. J7,J8,J9,J10 on a DINX4 module) for switches. You don't want the app to think you've got an encoder there when there are really switches.And just in case you don't know, you'll have to rebuild the setup_8580.asm into a new setup_8580.hex file. Learn how to do this here:http://www.ucapps.de/howto_tools_gpasm.html Quote Link to comment Share on other sites More sharing options...
nILS Posted March 6, 2008 Report Share Posted March 6, 2008 ...or check to WIKI, which has an incredibly nice HowTo on that topic *cough*http://www.midibox.org/dokuwiki/changing_din_pins Quote Link to comment Share on other sites More sharing options...
cosmosuave Posted March 6, 2008 Author Report Share Posted March 6, 2008 Thanks for the reply....I used this for the button encoder setup...http://www.ucapps.de/midibox_sid_cs/2x40_enc.pdfAs for asm setup file I used the one for 6581 since that is the chip I am using... In essence I should make the changes you suggested but for the setup_6581.asmI did check the wiki in regards to control panel connection... The wiki suggests testing din connections with a midio128 application... Upon veiwing the midibox128 section this is the only file that resembles midio128 application midio128_v2_1e.zip is this the right one... I know I have asked questions that have been answered numerous times but I do try to source an answer with the info provided on the site... I am not much of a programmer and in fear that I will corrupt my core...That' all.. Quote Link to comment Share on other sites More sharing options...
nILS Posted March 6, 2008 Report Share Posted March 6, 2008 ?! The WIKI page I linked suggests using http://www.ucapps.de/mios/ain64_din128_dout128_v2_0.zip, which is directly linked from there.Don't fear any harm - just follow the instructions ;) Quote Link to comment Share on other sites More sharing options...
Wilba Posted March 6, 2008 Report Share Posted March 6, 2008 ...or check to WIKI, which has an incredibly nice HowTo on that topic *cough*http://www.midibox.org/dokuwiki/changing_din_pinsYeah I knew that *cough* I'm just trying to build up my hours of community service by writing lengthy posts. ;) Quote Link to comment Share on other sites More sharing options...
nILS Posted March 7, 2008 Report Share Posted March 7, 2008 Yeah I knew that *cough* I'm just trying to build up my hours of community service by writing lengthy posts. ;)Sorry Wilba, I'll put you down on for the WIKI Update newsletter ;) Quote Link to comment Share on other sites More sharing options...
stryd_one Posted March 7, 2008 Report Share Posted March 7, 2008 There's a newsletter? And here's me, using the RSS feed. sheesh! ;D Quote Link to comment Share on other sites More sharing options...
cosmosuave Posted March 8, 2008 Author Report Share Posted March 8, 2008 Ok I have stuffed all the boards into the case and have loaded the ain64_din128_dout128_v2_0.zip file and following the wiki guide on How to detect the pins output config....Ok so this what I am seeing on the lcd...AIN DIN DOUTxx 0 22o 1oSo what is happening is that it looks like unde the AIN it is cycling thru a series of numbers very fast causing the 0 to flicker to a 1 breifly as in very very brief... 3 buttons do manage to change tunder the DIN... Nothing on the DOUT which does not apply (I think)...To troubleshoot I have done the following....To isolate the AIN cycling number issue I individually disconnected the connectors J3 to J6(DIN4 pcb) one by one to see if it would stop and it did not... Disconnected J1 (DIN4 pcb) and still no change... So any idea why the AIN is cycling through a series of numbers so rapidly or is this normal? When I boot up with the ain64_din128_dout128_v2_0 app I do not get the following as per the wiki guide lines Waiting for DIN or AIN event...Seems something on the core or the 2 SID boards are causing an issue...Thanks...BTW I have appreciated the help given in this thread and all the others that I have posted... Quote Link to comment Share on other sites More sharing options...
nILS Posted March 8, 2008 Report Share Posted March 8, 2008 ...turns out the WIKI page is already outdated as v1 of the app was used. :-[ The flickering AIN usually means you didn't ground the AIN pins or whatever you have hooked up to them is noisy. You can ignore that though. Every button you press should change the number under DIN. If it doesn't you have a hardware problem. Quote Link to comment Share on other sites More sharing options...
cosmosuave Posted March 8, 2008 Author Report Share Posted March 8, 2008 Cool cos some of the buttons work .... i.e Shift, Up, Down.... Back to the drawing board for me... ARRRRRRGGGGGHHHHH!!!!!... I'll get it to work this week... Thanks for your reply... Quote Link to comment Share on other sites More sharing options...
cosmosuave Posted March 9, 2008 Author Report Share Posted March 9, 2008 Thanks nILS it was a hardware grounding problem... I wired up the pos side of the DIN connectons to the ground of the switches... The switches I have, have 4 terminals and I was running a ground loop on all of them... Reconnected the pos leads from the DIN board to the pos side of the switch and am now getting pin read outs on the LCD.... Just have to jot down the pin#'s and do the compiling...Thanks once again... So close now to completion... Quote Link to comment Share on other sites More sharing options...
cosmosuave Posted March 10, 2008 Author Report Share Posted March 10, 2008 Ok I managed to write down all my Event numbers for the controls on my SID... Now I'm a little lost at this part as per the Wiki...SR = (event_number % 8) + 1, Pin = event_number - (SR * 8) In plain english SR is the event number divided by 8 (using integer division), and Pin is the remainder of that division.So this is what I think is correct ...Button 1 - Event# 8o SR= 2 (8/8)+1 Pin= 0 Button 2 - Event# 7o SR= 1 (7/8)+1 Pin= 0Button 3 - Event# 6o SR= 1 (6/8)+1 Pin= 0Button 6 - Event# 25o SR= 4 (25/8)+1 Pin= 1Am I understanding this correctly? Where I question things is when an event number is less than 8 that means the SR will always equal 1 and the Pin equals 0...Thanks... Quote Link to comment Share on other sites More sharing options...
nILS Posted March 10, 2008 Report Share Posted March 10, 2008 Thanks for pointing out a little mistake in the "plain english" version of the formula ;-) (Which didn't affect your calculations btw)With event numbers < 8, SR will always be 1 (which is correct) and Pin will be the event number, as it's the remainder of the division. Quote Link to comment Share on other sites More sharing options...
cosmosuave Posted March 10, 2008 Author Report Share Posted March 10, 2008 I have figured out SR and Pin mappings but there seems to be an issue with buttons 6-10 functioning... The LCD (2x40) is displaying 10 parameters with buttons 1-5 accessing those parameters but not buttons 6-10....I have made the change as outlined below and have made all other SR and Pin to 0 that are not being used to avoid conflicts due to duplicate values....I mod'dCode:#define CS_MENU_DISPLAYED_ITEMS 5toCode:#define CS_MENU_DISPLAYED_ITEMS 10Then deleted this all together...;; NOTE: if CS_MENU_DISPLAYED_ITEMS > 5, you have to adapt the DIN settings ;; in cs_menu_io_tables.incAlso in the CS_MENU_DIN_TABLE I deleted the following for buttons 6-10...; define this if CS_MENU_DISPLAYED_ITEMS > 5As I have I said I am not much of a programmer and slowly stumbling thru this with some results but for some reason buttons 6-10 are not being defined... They are there when I run the midi128 app to determine the event# for the buttons...On a side note the encoder is very erratic and takes multiple turns to change a parameter...Gotta step out and have a cappucino... Quote Link to comment Share on other sites More sharing options...
nILS Posted March 10, 2008 Report Share Posted March 10, 2008 Basically what that means is you need to *add* lines. Not remove them ;)In the seup_*.asm file there is the CS_MENU_DIN_TABLE, which you already modified. It needs 5 extra entries for the additional 5 buttons.Like this: DIN_ENTRY CS_MENU_BUTTON_Sel6, 1, 3 ; define this if CS_MENU_DISPLAYED_ITEMS > 5 DIN_ENTRY CS_MENU_BUTTON_Sel7, 1, 2 ; define this if CS_MENU_DISPLAYED_ITEMS > 5 DIN_ENTRY CS_MENU_BUTTON_Sel8, 1, 0 ; define this if CS_MENU_DISPLAYED_ITEMS > 5 DIN_ENTRY CS_MENU_BUTTON_Sel9, 1, 1 ; define this if CS_MENU_DISPLAYED_ITEMS > 5 DIN_ENTRY CS_MENU_BUTTON_Sel10, 2, 7 ; define this if CS_MENU_DISPLAYED_ITEMS > 5[/code]Just set the SR# and Pin# like you did with the other buttons and you're all set to go. Quote Link to comment Share on other sites More sharing options...
cosmosuave Posted March 10, 2008 Author Report Share Posted March 10, 2008 WooHoo buttons 6-10 are now working.... All that is left is the encoder... The encoder works without being erratic but turning it left or right only decreases the value of the parameter... Quote Link to comment Share on other sites More sharing options...
nILS Posted March 11, 2008 Report Share Posted March 11, 2008 1) Are the pins on the encoder connected correctly?2) Is the encoder connected to a pair of adjacent pins on an SR starting with an even one (0, 2, 4, 6)? Quote Link to comment Share on other sites More sharing options...
cosmosuave Posted March 11, 2008 Author Report Share Posted March 11, 2008 Encoder is working correctly WooHoo... Now there is no sound when there was sound.... Back to the interconnection test.... ARRRRGGGGHHHHHHHHH!!!!! Quote Link to comment Share on other sites More sharing options...
nILS Posted March 11, 2008 Report Share Posted March 11, 2008 Would you mind telling us what you did to fix it? Quote Link to comment Share on other sites More sharing options...
cosmosuave Posted March 11, 2008 Author Report Share Posted March 11, 2008 Would you mind telling us what you did to fix it?Well I came across the encoder diagram specs and noticed that the labelling for the lugs was different from what I assumed.... What I assumed was A, B, C when it was A, C, B? Felt like an ass after that... Now to figure out the interconnection test it was a month ago that I performed but I forget on how you toggle pins 1 - 14 on the SID socket... Using the modulation param via midi-ox but no dice... 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.