Jump to content

Change Encoder Direction on SEQV4


daemonik
 Share

Recommended Posts

The step encoders of my SEQ-V4 increment by turning ccw and decrement by turning cw :frantics:

So I want to change the direction of my encoders within the code of SEQ V4. But I feel unsure what code to add and where.

My guess (as C and MIOS rookie) is following code either in /core/seq_ui within the Encoder handler:

/////////////////////////////////////////////////////////////////////////////

// Encoder handler

/////////////////////////////////////////////////////////////////////////////

s32 SEQ_UI_Encoder_Handler(u32 encoder, s32 incrementer)

{

incrementer = 0-incrementer

or in /core/app:

void APP_ENC_NotifyChange(u32 encoder, s32 incrementer)

{

incrementer = 0-incrementer

doesn't make any big difference (as long as Idont use debug mode), right?

thanks for your inputs!

btw. change of the pinning hardwarewise is not really an option. I've (also for the first time) designed my own boards for Step-encoders, GP-buttons and GP-LED's. Accidentaly I mixed up the pinning of the encoders. The boards use smd parts :afro: and soldering wires between encoders and smd 74hc165 just is too fiddly...

Link to comment
Share on other sites

The change should work this way, but it should only be done once (for the case that this isn't obvious) in APP_ENC_NotifyChange before it's forwarded to the underlaying notification functions.

Best Regards, Thorsten.

Link to comment
Share on other sites

Thank you Thorsten...

of course I won't inverse the direction twice :rolleyes:

was it intended to connect pinA to D1 and pinB to D0? intuitively I' ve designed the board the opposite ... which turned out to be wrong.

However this forced me to have a closer look to the code finally ... and I'm going the learn C and programming MIOS-Apps for shure

BTW. concerning the encoders ALPS STEC11B from Reichelt which work best in DETENTED3 mode:

The encoders work similar to DETENTED2 (one detent position per cycle) BUT: detent positions are exactly at the rising/falling edge of terminal B (according to the spec-sheet:SPEC-SHEET ). this may explain the wobbly behaviour of the encoders in most modes (at least when turning cw, where inc is detected at the rise of terminal B).

However, what's different in mode DETENTED3 then?

cheers, Nick

Link to comment
Share on other sites

was it intended to connect pinA to D1 and pinB to D0? intuitively I' ve designed the board the opposite ... which turned out to be wrong.

I decided this pinning more than 10 years ago - at this point of time the pinning was layout-driven, I don't wanted to cross signal lines.

Of course, this can't be ensured for all encoder types... if it's an issue, you could either use a double layer PCB (which is probably the case anyhow?), or rotate the encoder by 180°

BTW. concerning the encoders ALPS STEC11B from Reichelt which work best in DETENTED3 mode:

The encoders work similar to DETENTED2 (one detent position per cycle) BUT: detent positions are exactly at the rising/falling edge of terminal B (according to the spec-sheet:SPEC-SHEET ). this may explain the wobbly behaviour of the encoders in most modes (at least when turning cw, where inc is detected at the rise of terminal B).

I agree and I consider to change the default mode for all applications in future since most people use Reichelt encoders meanwhile (in distance to 2..3 years ago and earlier, where no encoders where available at Reichelt, and therefore most people used encoders from Voti - or the Burns Browns from SmashTV of course)

I've some STEC11B encoders here, but need to test them by myself before providing the change.

I'm also planning to take pictures of the connections to avoid such accidents that happened at your side.

However, what's different in mode DETENTED3 then?

DETENTED2 increments/decrements at the rising edge of PinB, while DETENTED3 increments/decrements at the falling edge of PinB

Actually I think that it could improve results even more if increments are done at the rising edge of PinB, and decrements at the rising edge of PinA... or on the falling edge instead

This can be coded into the DETENTED value (no change in the encoder driver required), but again I haven't found the time to test this yet.

When I'm using the encoders of my MIDIboxes (as mentioned above: mostly from Voti or SmashTV), I don't notice any difference between DETENTED2 and DETENTED3, therefore I need to setup a test configuration with ALPS STEC11B first

Best Regards, Torsten.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...