Sign in to follow this  
Followers 0
THeff

Speed Param for Encoders

18 posts in this topic

Hello,

This is my first post on the forum.  I just finished building my MIDIbox SEQ and I used Panasonic encoders.  I ran the encoder speed test routine and determined the optimum values.  I found where to set the MIOS for non-detented encoders, but I can't seem to find where to put the speed values for fast and slow in the SEQ main.asm, or the MIOS tables.  It's probably right in front of me but I can't seem to find it.  Any pointers would be helpful.  Before I close let me say that TK you have done a magnificent job on the SEQ hardware, SW, and documentation!  I built the MIDIbox Plus 16 and MIDI monitor years (picture is in your gallery) and they work flawless as well.  Thanks!!!

THeff

Share this post


Link to post
Share on other sites

Hi,

the speed values can be changed in the .asm file you are using - either main.asm, or setup_mbseq_v2.asm - search for "SPEED"

Nice to hear, that this is the only problem :)

Best Regards, Thorsten.

Share this post


Link to post
Share on other sites

I guess I am still confused.  I did find the speed param for fast (default 3) but how do I change the slow?  I am getting double hits and the best speed seems to be "slow (4)" from the enc speed test program.  I assumed that it uses the (3) when fast is enabled and then goes back to normal when disabled.  If this is true it's the "normal" that I need to change.

THeff

Share this post


Link to post
Share on other sites

Try MIOS.H line 71?

Edit: Sorry, this was intended as a place to start looking, not as a parameter to change!! As TK said below, never change these!

Share this post


Link to post
Share on other sites

Thanks for the replies...

OK,

I found the three entries in the mios.h file (slow(0), normal(1), and fast(2)).  What value does "slow (4)" from the speed program translate to for a value to be placed in the .h file?  Also, I thought there were only two speeds - fast or not fast.  How are three speeds selected via the fast button? 

THeff

Share this post


Link to post
Share on other sites

I think that you are mixing something. The definitions in mios.h are constant values which are used to address the desired encoder mode from the application code. All values in mios.h should never be changed, this is "low level stuff"

The MBSEQ application only differs between "normal" and "fast" encoder settings. They are selected in SEQ_BUTTON_Fast (file seq_buttons.inc), and only allow one parameter for fast mode: DEFAULT_ENC_SPEED_VALUE

Do you really need different values? If so, the source code has to be changed in seq_buttons.inc, and in addition somewhere within the USER_Init function, since by default the "normal" mode is selected, which doesn't need further initialisations

Best Regards, Thorsten.

Share this post


Link to post
Share on other sites

Thanks TK for the explanation.  It operates as I thought Fast or Normal.  Problem is that in the normal mode with the Panasonic 24 ppr non-detented encoders it skips over entries even when you turn it very slow.  You have to go back and forth to catch the desired selection.  A predivider of 4 seems to work very smoothly.  I will investigate changing this entry in the files you mentioned.  I have also ordered some Alps detented encoders from Mouser in the mean time.  Thanks again for all your help!

Tim

Share this post


Link to post
Share on other sites

Hi Tim,

in normal mode, the encoders should increment without skipping values. The right place to setup this is mios_tables.inc (which you've already found). Did you also try the DETENTED and DETENTED2 setting? Even when you encoders are non-detented, the results could be better.

An oversight can be found here:

mios_encoder_modes.gif

Best Regards, Thorsten.

Share this post


Link to post
Share on other sites

Hi Tim,

just want to mention, that it could be, that your encoders are not connected correctly. Just try the three different pinning combinations, one should work much better.

Best Regards, Thorsten.

Share this post


Link to post
Share on other sites

Hi Thorsten,

I did try the DETENTED2 option and the results are about the same.  The movement is correct in both directions so I don't think it is a wiring issue.  I'm wondering if the Panasonic encoders have a lot of bounce in the contacts, because if you move it real slow sometimes it will go backwards and forwards a step or two.  Anyway, my Alps encoders will be here Wednesday so I'm just going to change them out.  These are detented encoders so it should be better all around.  I'll save the Panasonic encs for future projects (MBSID and MBFM).  That will give me more time to figure out a soulution.

Thanks,

Tim

Share this post


Link to post
Share on other sites

Hi Tim,

I'm using a detented panasonic encoder for the datawheel of my MBSEQ (therefore it is DETENTED and not DETENTED2 in mios_tables.inc) - it works very stable since two years. Thats all I can say. But Alps are pretty good as well.

The detends are very important for the sequencer for exact value adjustments - yes, non-detented are better for MBSID/MBFM (only exception: the datawheel should be detented)

Best Regards, Thorsten.

Share this post


Link to post
Share on other sites

Just  a final follow-up,

I replaced the Panasonic rotary encoders with ALPS EC12E2420802 encoders from Mouser and they work perfect, using the DETENTED2 option.  I tried all three options with the Panasonic encoders from Digikey and could not get them to work reliably.  Everything is working great now, including the AOUT module.

Regards,

Tim

Share this post


Link to post
Share on other sites

Hi Tim,

I noticed, that the MBSEQ application has set "32" as debounce value, this is (or was...) not good for rotary encoders. When you are changing this value to 0 (search for "DEBOUNCE" in the main.asm or setup_*.asm file), then the panasonic encoder will propably work fine.

With MIOS V1.9c this change won't be required anymore, because debouncing is only done for the buttons, not for encoders

Best Regards, Thorsten.

Share this post


Link to post
Share on other sites

Hi Thorsten,

Thanks for the update!  This is good news because I purchased a lot of the Panasonic encoders.  It's weird that the ALPS and Panasonic encoders behave so differently, because they look almost identical from the outside.  BTW anyone who wants to purchase the ALPS panel mount encoders from Mouser beware!, they don't send the mounting nuts and washers.  I called to let them know that they were missing and they said sorry, that's the way we sell them.  They told me I could purchase the hardware seperately if I wanted to.  Needless to say I was not very happy!

Regards,

Tim

Share this post


Link to post
Share on other sites

BTW anyone who wants to purchase the ALPS panel mount encoders from Mouser beware!, they don't send the mounting nuts and washers.  I called to let them know that they were missing and they said sorry, that's the way we sell them.  They told me I could purchase the hardware seperately if I wanted to.  Needless to say I was not very happy!

Regards,

Tim

Man, that's lame.. I would also assumed that the mounting hardware should be included..  I was about to order the APLS panel encoder!! You just saved me on this!!

thanks!! :D

Share this post


Link to post
Share on other sites

Just a follow-up to the previous message.  I received some back-ordered ALPS rotary encoders from Mouser today and they did ship them with the mounting nuts and washers.  They must have gotten the message!

Tim

Share this post


Link to post
Share on other sites

i am looking for buying that specific encoder as well (EC12E2420802).  it is optional pcb mount, right?

Share this post


Link to post
Share on other sites

i am looking for buying that specific encoder as well (EC12E2420802).  it is optional pcb mount, right?

All the encoders I´ve seen are PCB mount.

Moebius

p.s. You can use wires and attach the encoder to the frontpanel

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0