cosmosuave Posted March 24, 2008 Report Share Posted March 24, 2008 I am still having issues with my Bournes encoder being erratic when changing parameters... I have changed the detented value in the .asm file several times and the wiring to the encoder and no real change... When I compile the 6581.asm I do get the following error and is this causing the erratic behaviour of the encoder?Error msg..setup_6581.asm:411: Warning [202] Argument out of range. Least significant bits used.Is [202] the line of code that is causing the issue? Please forgive me as I am not that knowledgable about programming...Thanks... Quote Link to comment Share on other sites More sharing options...
nILS Posted March 24, 2008 Report Share Posted March 24, 2008 Apparently there's a warning in line 411 of setup_6581.asm :D Which line is that in your file?What this (which is not a MIOS error but a compiler warning btw) tells you is that some value is assigned to some variable, with the value being out of range. For instance if you had an "unsigned char" = 1 Byte = 0-255 and assigned 258 to it, you'd get that error. So, what's in line 411 of your setup_6581.asm? Quote Link to comment Share on other sites More sharing options...
cosmosuave Posted March 24, 2008 Author Report Share Posted March 24, 2008 I am unable to count down to line 411 with notepad or word pad... Is there some app that will let me display line#'s? Will MSWord do this? Quote Link to comment Share on other sites More sharing options...
Wilba Posted March 25, 2008 Report Share Posted March 25, 2008 Notepad++ http://notepad-plus.sourceforge.net/or a zillion other text editors out there. Quote Link to comment Share on other sites More sharing options...
Goblinz Posted March 25, 2008 Report Share Posted March 25, 2008 Notepad++ http://notepad-plus.sourceforge.net/or a zillion other text editors out there. LOL, was going to suggest that last night but my connection died. Notepad++ is an excellent editor. G Quote Link to comment Share on other sites More sharing options...
cosmosuave Posted March 25, 2008 Author Report Share Posted March 25, 2008 Thanks... I'll post line 411 today... Quote Link to comment Share on other sites More sharing options...
stryd_one Posted March 25, 2008 Report Share Posted March 25, 2008 Notepad++ is an excellent editor.Totally. The full explorer plugin (not the 'light' one that comes with) is a must-have too. In fact with it's external program (compiler) execution and debugger integration plugins, I've been thinking about it's use as a MIOS IDE, especially as it does ASM highlighting too, as it could be used as a single tool for both ASM and C apps (and those that use both)... Hmm </hijack> :-X Quote Link to comment Share on other sites More sharing options...
cosmosuave Posted March 25, 2008 Author Report Share Posted March 25, 2008 Okay here is the line 411 and it deals with the encoder so I hope this will fix the erratic behaviour once someone looks at the code...;; encoder entry structureENC_ENTRY MACRO sr, din_0, mode dw (mode << 8) | (din_0 + 8*(sr-1)) <---------This is Line 411 ENDM ENC_EOT MACRO dw 0xffff ENDMKind of ironic that the error is 411 and that I need nfo on the 411... Ok bad humour...Thanks... Quote Link to comment Share on other sites More sharing options...
bugfight Posted March 25, 2008 Report Share Posted March 25, 2008 Okay here is the line 411 and it deals with the encoder so I hope this will fix the erratic behaviour once someone looks at the code...;; encoder entry structureENC_ENTRY MACRO sr, din_0, mode...this no doubt indicates and error in your encoder table, take a look at that and if you don't see the problem, post the table and someone will help...oh, and use the code tag, so it is more readable (the # button above) Quote Link to comment Share on other sites More sharing options...
cosmosuave Posted March 25, 2008 Author Report Share Posted March 25, 2008 Okay hope this is what's req'dThis code for the contrl panel...________________________________________________________________CS_MENU_DIN_TABLE ;; Function name SR# Pin# DIN_ENTRY CS_MENU_BUTTON_Dec, 2, 1 ; only valid if rotary encoder not assigned to these pins DIN_ENTRY CS_MENU_BUTTON_Inc, 2, 0 ; (see mios_tables.inc) and CS_MENU_USE_INCDEC_BUTTONS == 1_____________________________________________________________________________Encoder code...;; encoder entry structureENC_ENTRY MACRO sr, din_0, mode dw (mode << 8) | (din_0 + 8*(sr-1)) ENDM ENC_EOT MACRO dw 0xffff ENDMMIOS_ENC_PIN_TABLE ;; SR Pin Mode#if CS_MENU_USE_INCDEC_BUTTONS == 0 ENC_ENTRY 2, 0, MIOS_ENC_MODE_DETENTED3 ; menu encoder#endif ;; additional CS encoders ;; SR Pin Mode ENC_ENTRY 0, 0, MIOS_ENC_MODE_DETENTED3 ; Osc delay/transpose/assign #1 ENC_ENTRY 0, 0, MIOS_ENC_MODE_DETENTED3 ; Osc attack/finetune/assign #2 ENC_ENTRY 0, 0, MIOS_ENC_MODE_DETENTED3 ; Osc decay/portamento/assign #3 ENC_ENTRY 0, 0, MIOS_ENC_MODE_DETENTED3 ; Osc sustain/release/assign #4 ENC_ENTRY 0, 0, MIOS_ENC_MODE_DETENTED3 ; Osc release/pulsewidth/assign #5 ENC_ENTRY 0, 0, MIOS_ENC_MODE_DETENTED3 ; LFO rate ENC_ENTRY 0, 0, MIOS_ENC_MODE_DETENTED3 ; LFO depth ENC_ENTRY 0, 0, MIOS_ENC_MODE_DETENTED3 ; Filter CutOff ENC_ENTRY 0, 0, MIOS_ENC_MODE_DETENTED3 ; Filter Resonance ENC_ENTRY 0, 0, MIOS_ENC_MODE_DETENTED3 ; Env depth/assign #1 ENC_ENTRY 0, 0, MIOS_ENC_MODE_DETENTED3 ; Env attack/assign #2 ENC_ENTRY 0, 0, MIOS_ENC_MODE_DETENTED3 ; Env decay/assign #3 ENC_ENTRY 0, 0, MIOS_ENC_MODE_DETENTED3 ; Env sustain/assign #4 ENC_ENTRY 0, 0, MIOS_ENC_MODE_DETENTED3 ; Env release/assign #5 ;; don't remove this "end-of-table" entry! ENC_EOT Quote Link to comment Share on other sites More sharing options...
bugfight Posted March 25, 2008 Report Share Posted March 25, 2008 yes that's the stuff.it looks ok to me, did you define MIOS_ENC_MODE_DETENTED3 yourself?it should be MIOS_ENC_MODE_DETENTED3 EQU 0x82 Quote Link to comment Share on other sites More sharing options...
cosmosuave Posted March 25, 2008 Author Report Share Posted March 25, 2008 yes that's the stuff.it looks ok to me, did you define MIOS_ENC_MODE_DETENTED3 yourself?it should be MIOS_ENC_MODE_DETENTED3 EQU 0x82 Yes I try'd DETENTED2 and it produced erratic behaviour with the Bournes encoder... I may start with a fresh 6581.asm file and go from there... Quote Link to comment Share on other sites More sharing options...
nILS Posted March 25, 2008 Report Share Posted March 25, 2008 sidenote: Notepad DOES display line numbers when word-wrap is disabled and the status bar is displayed. Quote Link to comment Share on other sites More sharing options...
cosmosuave Posted March 25, 2008 Author Report Share Posted March 25, 2008 Started with a new 6581.asm file made my changes and used the default DETENTED2 and still get the same following error but at line 408dw (mode << | (din_0 + 8*(sr-1)) <---------This is Line 408As I recall there were some discussions about this formula in one of my previous threads... Quote Link to comment Share on other sites More sharing options...
stryd_one Posted March 26, 2008 Report Share Posted March 26, 2008 cosmo... try using the code tag like bugfight said, it will stop your code from getting mangled up and turned into smilies and such, and allow others who would like to help you (like for example me), to read it clearly.nils: yes you can also use 'Edit.. Go' and enter the line you want.edit: oh and cosmo link us to that thread mate. Quote Link to comment Share on other sites More sharing options...
cosmosuave Posted March 30, 2008 Author Report Share Posted March 30, 2008 cosmo... try using the code tag like bugfight said, it will stop your code from getting mangled up and turned into smilies and such, and allow others who would like to help you (like for example me), to read it clearly.nils: yes you can also use 'Edit.. Go' and enter the line you want.edit: oh and cosmo link us to that thread mate.Code tag what is that? I know what you mean when i post the code I'm getting smilies and I checked in my profile to disable but I can't... Here is a link to the thread that I think may relate to my issue... For this line of code...dw (mode << | (din_0 + 8*(sr-1)) <---------This is Line 408Link: http://www.midibox.org/forum/index.php/topic,10936.msg84596.html#msg84596Scroll to the bottom of 1st page... Then again those #%!! smilies are screwing things up again... I need to get this encoder sorted trying to program the sequencer on the bass engine is a PITA.. Quote Link to comment Share on other sites More sharing options...
Goblinz Posted March 31, 2008 Report Share Posted March 31, 2008 It's quite straight forward, the tag to do it is CODE, it needs to be in the middle of two square brackets. IE (CODE) Your code here (/CODE) (Square brackets replaced by normal ones to allow tags to be displayed.) G ;) Quote Link to comment Share on other sites More sharing options...
cosmosuave Posted March 31, 2008 Author Report Share Posted March 31, 2008 Thanks... I'll post later today... Quote Link to comment Share on other sites More sharing options...
cosmosuave Posted April 1, 2008 Author Report Share Posted April 1, 2008 Okay I manged to find some time to post this... I am having erratic behaviour with my bournes encoder... I have changed the wiring config several times and no change and the various detented settings in the 6581.asm file... Also getting line errors when compiling the asm file... I thinks it is a coding issue....DIN_ENTRY MACRO function, sr, pin dw function, (pin + 8*(sr-1)) & 0xff ENDM DIN_ENTRY_EOT MACRO dw 0x0000, 0x0000 ENDM CS_MENU_DIN_TABLE ;; Function name SR# Pin# DIN_ENTRY CS_MENU_BUTTON_Dec, 2, 1 ; only valid if rotary encoder not assigned to these pins DIN_ENTRY CS_MENU_BUTTON_Inc, 2, 0 ; (see mios_tables.inc) and CS_MENU_USE_INCDEC_BUTTONS == 1 DIN_ENTRY CS_MENU_BUTTON_Exec, 2, 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, 2, 3 DIN_ENTRY CS_MENU_BUTTON_Sel6, 4, 0 ; define this if CS_MENU_DISPLAYED_ITEMS > 5 DIN_ENTRY CS_MENU_BUTTON_Sel7, 4, 1 ; define this if CS_MENU_DISPLAYED_ITEMS > 5 DIN_ENTRY CS_MENU_BUTTON_Sel8, 4, 2 ; define this if CS_MENU_DISPLAYED_ITEMS > 5 DIN_ENTRY CS_MENU_BUTTON_Sel9, 4, 3 ; define this if CS_MENU_DISPLAYED_ITEMS > 5 DIN_ENTRY CS_MENU_BUTTON_Sel10, 3, 4 ; define this if CS_MENU_DISPLAYED_ITEMS > 5 DIN_ENTRY CS_MENU_BUTTON_SID1, 0, 0 DIN_ENTRY CS_MENU_BUTTON_SID2, 0, 0 DIN_ENTRY CS_MENU_BUTTON_SID3, 0, 0 DIN_ENTRY CS_MENU_BUTTON_SID4, 0, 0 DIN_ENTRY CS_MENU_BUTTON_Shift, 3, 5 ; was: link button DIN_ENTRY CS_MENU_BUTTON_CC_PageUp, 3, 6 ; combined CC/PageUp -- CC actived together with shift button (no error) DIN_ENTRY CS_MENU_BUTTON_Edit_PageDown, 3, 7 ; combined Edit/PageDown -- Edit actived together with shift button (no error) DIN_ENTRY CS_MENU_BUTTON_Osc_Sel, 0, 0 DIN_ENTRY CS_MENU_BUTTON_Osc_Ctrl, 0, 0 DIN_ENTRY CS_MENU_BUTTON_Osc_Wav, 0, 0 DIN_ENTRY CS_MENU_BUTTON_Osc_RS, 0, 0 DIN_ENTRY CS_MENU_BUTTON_LFO_Sel, 0, 0 DIN_ENTRY CS_MENU_BUTTON_LFO_Wav, 0, 0 DIN_ENTRY CS_MENU_BUTTON_Env_Sel, 0, 0 DIN_ENTRY CS_MENU_BUTTON_Env_Ctrl, 0, 0 DIN_ENTRY CS_MENU_BUTTON_Fil_Sel, 0, 0 DIN_ENTRY CS_MENU_BUTTON_Fil_Mod, 0, 0 DIN_ENTRY CS_MENU_BUTTON_M_O1Ptch, 0, 0 DIN_ENTRY CS_MENU_BUTTON_M_O2Ptch, 0, 0 DIN_ENTRY CS_MENU_BUTTON_M_O3Ptch, 0, 0 DIN_ENTRY CS_MENU_BUTTON_M_O1PW, 0, 0 DIN_ENTRY CS_MENU_BUTTON_M_O2PW, 0, 0 DIN_ENTRY CS_MENU_BUTTON_M_O3PW, 0, 0 DIN_ENTRY CS_MENU_BUTTON_M_Filter, 0, 0 DIN_ENTRY CS_MENU_BUTTON_M_E1, 0, 0 DIN_ENTRY CS_MENU_BUTTON_M_E2, 0, 0 DIN_ENTRY CS_MENU_BUTTON_M_L1, 0, 0 DIN_ENTRY CS_MENU_BUTTON_M_L2, 0, 0 DIN_ENTRY CS_MENU_BUTTON_M_L3, 0, 0 DIN_ENTRY CS_MENU_BUTTON_M_L4, 0, 0 DIN_ENTRY CS_MENU_BUTTON_M_L5, 0, 0 DIN_ENTRY CS_MENU_BUTTON_M_L6, 0, 0 DIN_ENTRY CS_MENU_BUTTON_M_Vol, 0, 0 Above is for my control panel for a 2x40 LCD config... ;; encoder entry structure ENC_ENTRY MACRO sr, din_0, mode dw (mode << 8) | (din_0 + 8*(sr-1)) ENDM ENC_EOT MACRO dw 0xffff ENDM MIOS_ENC_PIN_TABLE ;; SR Pin Mode #if CS_MENU_USE_INCDEC_BUTTONS == 0 ENC_ENTRY 2, 0, MIOS_ENC_MODE_DETENTED2 ; menu encoder #endif ;; additional CS encoders ;; SR Pin Mode ENC_ENTRY 0, 0, MIOS_ENC_MODE_DETENTED2 ; Osc delay/transpose/assign #1 ENC_ENTRY 0, 0, MIOS_ENC_MODE_DETENTED2 ; Osc attack/finetune/assign #2 ENC_ENTRY 0, 0, MIOS_ENC_MODE_DETENTED2 ; Osc decay/portamento/assign #3 ENC_ENTRY 0, 0, MIOS_ENC_MODE_DETENTED2 ; Osc sustain/release/assign #4 ENC_ENTRY 0, 0, MIOS_ENC_MODE_DETENTED2 ; Osc release/pulsewidth/assign #5 ENC_ENTRY 0, 0, MIOS_ENC_MODE_DETENTED2 ; LFO rate ENC_ENTRY 0, 0, MIOS_ENC_MODE_DETENTED2 ; LFO depth ENC_ENTRY 0, 0, MIOS_ENC_MODE_DETENTED2 ; Filter CutOff ENC_ENTRY 0, 0, MIOS_ENC_MODE_DETENTED2 ; Filter Resonance ENC_ENTRY 0, 0, MIOS_ENC_MODE_DETENTED2 ; Env depth/assign #1 ENC_ENTRY 0, 0, MIOS_ENC_MODE_DETENTED2 ; Env attack/assign #2 ENC_ENTRY 0, 0, MIOS_ENC_MODE_DETENTED2 ; Env decay/assign #3 ENC_ENTRY 0, 0, MIOS_ENC_MODE_DETENTED2 ; Env sustain/assign #4 ENC_ENTRY 0, 0, MIOS_ENC_MODE_DETENTED2 ; Env release/assign #5 ;; don't remove this "end-of-table" entry! ENC_EOT Above code for encoder... dw (mode << 8) | (din_0 + 8*(sr-1))Above code for line 408 error... That code is part of the encoder code.... Is that formula above correct? I want to sort this encoder issue out or I will have to resort to up/down buttons which will not look nice with a big hole on the control surface where the encoder once was... Quote Link to comment Share on other sites More sharing options...
nILS Posted April 1, 2008 Report Share Posted April 1, 2008 Since what you just posted looks correct (at first sight) I'd guess you messed with some other part of the source code or your encoder is broken or your DIN is not working.a) try another encoderb) connect the encoder to a different SRc) download a clean version of the source Quote Link to comment Share on other sites More sharing options...
cosmosuave Posted April 2, 2008 Author Report Share Posted April 2, 2008 Since what you just posted looks correct (at first sight) I'd guess you messed with some other part of the source code or your encoder is broken or your DIN is not working.a) try another encoderb) connect the encoder to a different SRc) download a clean version of the sourcea) have yet to try none of my local shops carry encodersb) will give this a goc) I have a dl'd a clean version in the event something else was causing issues but no change..Thanks Nils I'll try b and hope that will work if not then I'll source an encoder... Quote Link to comment Share on other sites More sharing options...
stryd_one Posted April 4, 2008 Report Share Posted April 4, 2008 Have you tried the ain-din-dout 128 app to see if the encoders behave there?I assume the app uploads in mios studio without errors? Quote Link to comment Share on other sites More sharing options...
cosmosuave Posted April 4, 2008 Author Report Share Posted April 4, 2008 I have changed the encoder to different pins... When I change the coding on the 6581asm file sometimes I can get values to increment one integer at a time but the drawback is this: Only works to decrease value no matter which way the encoder is turned... When turning the encoder left/right the integer value is erratic... Going to DL a new asm file load it to see if I get the compiling error that I have been getting and start changing the coding one section at a time and compile to see what I am doing wrong.... Quote Link to comment Share on other sites More sharing options...
cosmosuave Posted April 4, 2008 Author Report Share Posted April 4, 2008 Downloaded http://www.ucapps.de/mios/midibox_sid_v2_0_rc17.zip but now it has been revised to http://www.ucapps.de/mios/midibox_sid_v2_0_rc18.zip...Open the 6581.asm file in note pad to configure SR pins and it one huge mess of text... Open in Notepad++ but have now idea how to compile it into a hex file? When I was using rc17.zip 6581.asm file I compiled the gpasm way using the DOS cmd window using the [make] comand...I have now opened a whole can of worms... Al I want is this encoder to work like it should (smacks forehead)... Quote Link to comment Share on other sites More sharing options...
cosmosuave Posted April 23, 2008 Author Report Share Posted April 23, 2008 WooHoo!!! Recieved my SID kit from Smash with the extra encoders (Bournes switched) and installed the new encoder and my skipping encoder issues are a thing of the past... Now to start getting into my SID... 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.