Jump to content

DIN with Encoders AND Buttons


jholzer
 Share

Recommended Posts

Hi!

I have a DIN-Module that should be connected to 4 Encoders plus 24 Buttons.

I tried to configure, but unfortunately i only got MIDI-signals from the very first pin of the first IC (J3)

When i connect an encoder to J3, it reacts like a button (DIN_NotifyToggle). The same when i connect a button to J3.

What is kind of weird is, that not only one single MIDI-event is sent, but events for all MIDI-Notes (at least, that´s what it seems like)

Connection to any other pin than J3 does nothing at all.

So i guess i have to do some configuration in MIOS. But i couldn´t figure out what...

The question is:

How do i configure MIOS to work with this mixture?

I hope anyone can help me!

Thanx a lot

Greeting from Regensburg (Germany)

J.Holzer

Link to comment
Share on other sites

Hi!

My Encoder-table looks like this:

MIOS_ENC_PIN_TABLE

;; encoders 1-16

;;        SR  Pin  Mode

ENC_ENTRY  1,  0,  MIOS_ENC_MODE_NON_DETENTED  ; V-Pot 1

        ENC_ENTRY  1,  2,  MIOS_ENC_MODE_NON_DETENTED  ; V-Pot 2

        ENC_ENTRY  1,  4,  MIOS_ENC_MODE_NON_DETENTED  ; V-Pot 3

        ENC_ENTRY  1,  6,  MIOS_ENC_MODE_NON_DETENTED  ; V-Pot 4

ENC_EOT

ENC_EOT

ENC_EOT

ENC_EOT

and in Init i copied a passage from an example:

//Buttons

// set shift register update frequency

MIOS_SRIO_UpdateFrqSet(1); // ms

// we need to set at least one IO shift register pair

MIOS_SRIO_NumberSet(16); // for 128 pins

// debouncing value for DINs

MIOS_SRIO_DebounceSet(10);

I don´t know if this config is right as i´m using just one DIN which has 4 ICs.

Link to comment
Share on other sites

I tried this. But no change at all...

When pushing a button connected to the only working pin i get the following messages (copied from MIOS Studio):

00000000202407 ms | [90 08 7F] Channel 1: Note On G#-1 velocity: 127
00000000202409 ms | [90 09 7F] Channel 1: Note On A-1 velocity: 127
00000000202420 ms | [90 0A 7F] Channel 1: Note On A#-1 velocity: 127
00000000202422 ms | [90 0B 7F] Channel 1: Note On B-1 velocity: 127
00000000202433 ms | [90 0C 7F] Channel 1: Note On C0 velocity: 127
00000000202437 ms | [90 0D 7F] Channel 1: Note On C#0 velocity: 127
00000000202446 ms | [90 0E 7F] Channel 1: Note On D0 velocity: 127
00000000202448 ms | [90 0F 7F] Channel 1: Note On D#0 velocity: 127
00000000202459 ms | [90 10 7F] Channel 1: Note On E0 velocity: 127
00000000202461 ms | [90 11 7F] Channel 1: Note On F0 velocity: 127
00000000202472 ms | [90 12 7F] Channel 1: Note On F#0 velocity: 127
00000000202474 ms | [90 13 7F] Channel 1: Note On G0 velocity: 127
00000000202485 ms | [90 14 7F] Channel 1: Note On G#0 velocity: 127
00000000202488 ms | [90 15 7F] Channel 1: Note On A0 velocity: 127
00000000202498 ms | [90 16 7F] Channel 1: Note On A#0 velocity: 127
00000000202500 ms | [90 17 7F] Channel 1: Note On B0 velocity: 127
00000000202511 ms | [90 18 7F] Channel 1: Note On C1 velocity: 127
00000000202513 ms | [90 19 7F] Channel 1: Note On C#1 velocity: 127
00000000202524 ms | [90 1A 7F] Channel 1: Note On D1 velocity: 127
00000000202526 ms | [90 1B 7F] Channel 1: Note On D#1 velocity: 127
00000000202537 ms | [90 1C 7F] Channel 1: Note On E1 velocity: 127
00000000202539 ms | [90 1D 7F] Channel 1: Note On F1 velocity: 127
00000000202550 ms | [90 1E 7F] Channel 1: Note On F#1 velocity: 127
00000000202555 ms | [90 1F 7F] Channel 1: Note On G1 velocity: 127

What did i do wrong?

Link to comment
Share on other sites

Hi!

I use a self-made application based on MIOS and the C-skeleton.

Attached is a ZIP containing the main.c and mios_tables.inc that i modified from the skeleton.

There is 1 DIN4X and 1 AIN4x (not tested yet).

On DIN the shall be 4 Encoders on the first 8 pins, the other 24 pins are connected to Buttons.

Source.zip

Source.zip

Link to comment
Share on other sites

No.

It only sends if a encoder is moved.

The problem is, that only the very first pin acts like a button.

All Midi-Events come from DIN_NotifyToggle, i got no event from ENC_NotifyChange, where they should come from if the pin is <8 (=> encoder-table>.

And DIN_NotifyToggle sends not one event (i tried this also with a button conntected to pin 1) but many (see post from 17-04-2008, 23:13:03).

Looks like the shift registers are not shifting.

But why?

Link to comment
Share on other sites

i'm not sure but it seems that your app send midi data even when encoder don't move (-->if incrementer > 0... else .. (so else is when incrementer == 0 too )..

Basically correct, but the function isn't even called by MIOS when no encoder is moved ;)

All Midi-Events come from DIN_NotifyToggle, i got no event from ENC_NotifyChange, where they should come from if the pin is <8 (=>encoder-table>.

So the DINx works well for buttons, just not for your encoders? What encoders are those?

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...