Multiplexing 8 analog inputs using a CD4051B - Page 5
Page 5 of 6 FirstFirst 123456 LastLast
Results 41 to 50 of 57
  1. #41
    Tech Mentor sidetrakd's Avatar
    Join Date
    Oct 2010
    Location
    Ireland
    Posts
    356

    Default

    Hi Fatlimey, New pcb is on the way so I was wondering is there a way to avoid this problem happening again?Have no need for a second midifighter clock on my wall
    The Djtt Psychic Network has closed for the day. If you need help from the non-psychic members of the forum, you need to be more specific
    http://soundcloud.com/djsidetrakd
    Check out my midifighter extreme!! http://www.djtechtools.com/forum/showthread.php?t=28014

  2. #42
    Tech Guru Fatlimey's Avatar
    Join Date
    Mar 2008
    Location
    Redmond, WA
    Posts
    1,169

    Default

    The trick is kill the SPIEN fuse (See page 245 of the AT90USB162 datasheet) at programming time. If you have a JTAG programmer this is easy to do.

    Set this bit and no more failures (we've tried glitching boards every second for 48 hours straight and no failures).

  3. #43
    Tech Mentor sidetrakd's Avatar
    Join Date
    Oct 2010
    Location
    Ireland
    Posts
    356

    Default

    Cool thanks!I assume this will be have been done with my new pcb?
    No hope for the old one since i "modded" it!!
    The Djtt Psychic Network has closed for the day. If you need help from the non-psychic members of the forum, you need to be more specific
    http://soundcloud.com/djsidetrakd
    Check out my midifighter extreme!! http://www.djtechtools.com/forum/showthread.php?t=28014

  4. #44
    Tech Wizard Brinx's Avatar
    Join Date
    Jun 2011
    Location
    Stockholm, Sweden
    Posts
    43

    Default

    I started a new thread with this question but realised it would be better suited here, so here it goes:

    So i have a Midi Fighter classic wich i want to modify with a new case and a couple of extra faders, knobs and buttons (16 in total). Would it be possible to multiplex the inputs to 16 using one of theese?

    http://www.electrokit.se/moduler-sty...bkort_41003469

    And also how complex would the firmware editing be?
    Im planing on using the Midi fighter in 4 bank mode.

    Any help is highly appreciated!

  5. #45
    Tech Guru Fatlimey's Avatar
    Join Date
    Mar 2008
    Location
    Redmond, WA
    Posts
    1,169

    Default

    Using a 16-way multiplexer like the 74HC4067 it should be simple enough.

    http://www.nxp.com/documents/data_sh...HC_HCT4067.pdf

    The 4 digital inputs to the chip would be the 4 digital pins of the Midifighter, so if you do this you get 16 analog inputs and no digital switches. If you want 16 inputs as well as additional switches it gets a lot more complicated and relies on you setting up an SPI bus on the digital pins and serially controling a pair of devices hanging off the same bus, or setting up a software-based I2C bus and addressing devices by bus number.

    At least if you do that then adding LEDs is simply another device on the chain.

  6. #46
    Tech Wizard Brinx's Avatar
    Join Date
    Jun 2011
    Location
    Stockholm, Sweden
    Posts
    43

    Default

    Thx Limey!

    Couple of further questions:

    1. Would the 16 pins be in/out mening i could hook up leds to 4 of them and control by sending midi out on those specific pins, leaving me 12 inputs for faders, buttons,knobs and such?

    2. Would it be possible to program the firmware so that the faders and knobs connected to the multiplexer also switches CC in 4 bank mode?

    3. Would anyone care to help me program the firmware when this is done?

    Thx!

    Btw. Djtechtools forum rocks! You guys are helpful geniuses!

  7. #47
    Tech Guru Fatlimey's Avatar
    Join Date
    Mar 2008
    Location
    Redmond, WA
    Posts
    1,169

    Default

    Quote Originally Posted by Brinx View Post
    1. Would the 16 pins be in/out mening i could hook up leds to 4 of them and control by sending midi out on those specific pins, leaving me 12 inputs for faders, buttons,knobs and such?
    Yes, multiplexer pins are bidirectional so you can connect an LED to an input/output pin and control it from the CPU side, but it will only be turned on for 1/16th of the time leaving you with a not very bright LED.

    Quote Originally Posted by Brinx View Post
    2. Would it be possible to program the firmware so that the faders and knobs connected to the multiplexer also switches CC in 4 bank mode?
    Absolutely. The CPU decides what each input means at any point in time and outputs MIDI as needed.

    Quote Originally Posted by Brinx View Post
    3. Would anyone care to help me program the firmware when this is done?
    After connecting up the wires it's mostly a software project. Are you thinking of doing any of this project yourself?

  8. #48
    Tech Wizard Brinx's Avatar
    Join Date
    Jun 2011
    Location
    Stockholm, Sweden
    Posts
    43

    Default

    Thanks for answering my questions!

    Im going to design it and build it myself, yes.
    I have a design for it and some pretty good knowledge of soldering and i will build the case out of wallnut myself. Top plate will be aluminum.

    When it comes to programming and altering the firmware i have no experience . I have done some super easy stuff on the arduino and thats about it.

    I guess the main work would be in the programming so i guess im gonna have to learn that then

    Im going to have alot of questions when it comes to the code, but im in no rush, so il try to figure out as much as possible myself!

    Thx for the help!

  9. #49
    DJTT Super Moderator midifidler's Avatar
    Join Date
    Mar 2008
    Location
    San Francisco
    Posts
    1,902

    Default

    Im going to have alot of questions when it comes to the code, but im in no rush, so il try to figure out as much as possible myself!
    That's the right attitude!

  10. #50
    Tech Mentor
    Join Date
    Apr 2011
    Location
    Ireland
    Posts
    118

    Default

    The source to our (Sidetrakd and me) mod is here. It does a lot of what you want: multiplexed analog inputs, additional buttons, LEDs. Unlike fatlimeys suggestion, we do not bitbang SPI for our "digital" inputs as we don't really use digital inputs at all - instead we read the buttons as analog inputs instead where a value greater than some threshold (don't remember what I used offhand) is treated as a button being pressed.

    Adding additional LEDs is more complicated, though, and does require SPI to connect to LED drivers. Again, we did not bitbang it, instead we connected our LED driver (actually, we made our own out of a PIC24H, definitely not cost effective, just we happened to have one handy) to the existing SPI pins (mk3 MF boards have solder points for these), but while the analog input/multiplexer code is all in midifighter.c, the code for the LEDs is scattered around spi.c and mod.c, so would take quite a lot more effort to get working for your mod.

    In any case, I hope the code gives you some ideas to work from. Sadly I'm super busy right now, so don't really have time to give a hand.

Page 5 of 6 FirstFirst 123456 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •