Hey,
I’m trying to get the DIN-Module working with some of my Encoders, but it doesn’t work.
I have 1 Encoder (EN11-VSM1BF20) connected to the 10th and 11th Pin (D0,D1) of the first SR. This Encoder is also connected to 2 10K resistors. The other Pins (D2,D3,D4,D5,D6,D7) are only connected to other 10k resistors.
I use the following code:
int enc;
for(enc=0; enc<NUM_ENCODERS; ++enc) {
u8 pin_sr = enc >> 2; // each DIN SR has 4 encoders connected
u8 pin_pos = (enc & 0x3) << 1; // Pin position of first ENC channel: either 0, 2, 4 or 6
mios32_enc_config_t enc_config = MIOS32_ENC_ConfigGet(enc);
enc_config.cfg.type = DETENTED2; // see mios32_enc.h for available types
enc_config.cfg.sr = pin_sr;
enc_config.cfg.pos = pin_pos;
enc_config.cfg.speed = NORMAL;
enc_config.cfg.speed_par = 0;
MIOS32_ENC_ConfigSet(enc, enc_config);
}
NUM_ENCODERS is 1.
And in the ENC_Notify_Change App it says:
MIOS32_BOARD_LED_Set(0x0001, ~MIOS32_BOARD_LED_Get());
// determine relative value: 64 +/- <incrementer>
int value = 64 + incrementer;
// ensure that value is in range of 0..127
if( value < 0 )
value = 0;
else if( value > 127 )
value = 127;
// send event
MIOS32_MIDI_SendCC(DEFAULT, Chn1, 0x10 + encoder, value);
But if I’m moving the Encoder, nothing happens.
If the other free pins aren’t connected to their 10k resistors, the ENC_Notify_Change App is called randomly and sends random values over the DEFAULT Midi Port. Also the LED is blinking randomly…
I soldered the Module twice, changed all the components, tried different tutorials(14, 15) but yet it still doesn’t work ![]()
Has anyone some tips ?