Jump to content

How to connect mouse encoder to 74HC165


spongebob

Recommended Posts

That looks about right to me.

If you want to check it, maybe see if you can find schems for the other DIY encoders, like rasteri's or sashas. I would assume that you've found the other threads about mouse encoders already, and they didn't have any schems? It would be cool if you could tag them all, so that those threads lead to your answer :)

Link to comment
Share on other sites

  • 6 months later...

I have connected encoder according to the scheme in the second drawing and began to receive such signals from a kernel:

00000000313896 ms | [B0 20 3F] Channel 1: CC LSB 0 (Bank Select) value: 63
00000000313956 ms | [B0 20 3F] Channel 1: CC LSB 0 (Bank Select) value: 63
00000000314016 ms | [B0 20 3F] Channel 1: CC LSB 0 (Bank Select) value: 63
00000000314076 ms | [B0 20 3F] Channel 1: CC LSB 0 (Bank Select) value: 63
00000000314136 ms | [B0 20 3F] Channel 1: CC LSB 0 (Bank Select) value: 63
00000000314197 ms | [B0 20 3F] Channel 1: CC LSB 0 (Bank Select) value: 63
00000000314257 ms | [B0 20 3F] Channel 1: CC LSB 0 (Bank Select) value: 63
00000000314317 ms | [B0 20 3F] Channel 1: CC LSB 0 (Bank Select) value: 63
00000000314376 ms | [B0 20 3F] Channel 1: CC LSB 0 (Bank Select) value: 63
00000000314436 ms | [B0 20 3F] Channel 1: CC LSB 0 (Bank Select) value: 63
00000000314496 ms | [B0 20 3F] Channel 1: CC LSB 0 (Bank Select) value: 63
00000000314556 ms | [B0 20 3F] Channel 1: CC LSB 0 (Bank Select) value: 63
00000000314616 ms | [B0 20 3F] Channel 1: CC LSB 0 (Bank Select) value: 63
main.c
MIOS_ENC_TABLE {
   MIOS_ENC_ENTRY(7, 0, MIOS_ENC_MODE_NON_DETENTED), //
   MIOS_ENC_EOT
};

...
void Init...
for(i=0; i<2; ++i) {
    // available speed modes: SLOW, NORMAL and FAST
    MIOS_ENC_SpeedSet(i, MIOS_ENC_SPEED_SLOW, 2); // encoder, speed mode, divider
  }
...
void ENC_NotifyChange....
 MIOS_MIDI_BeginStream();
  MIOS_MIDI_TxBufferPut(0xb0);           // CC at MIDI Channel #1
  MIOS_MIDI_TxBufferPut(0x20 + encoder); // CC# is 0x20 (32) for first encoder
  MIOS_MIDI_TxBufferPut((0x40 + incrementer) & 0x7f);
  // this "40 +/- speed" format is used by NI software and some others
  MIOS_MIDI_EndStream();

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...
×
×
  • Create New...