Jump to content

Recommended Posts

Posted

Have been working on adding physical controls to the Goom synth (so thrilled this is ported to MIOS!), and noticed that the AINSER64 module appears to scan each MUX in reverse order.  I built a small version of the AINSER module (3 mux's) using channel 0-2 of the ADC, and realized I should have used 5-7.  Looking through the code for AINSER.c and mios32_spi.c and I can't figure out why it's scanning channel seven first and assigning it pins 1-8 and so on.  It's not a huge deal for this project (I can just offset my pin values), but was wondering if anyone could shed any light into what's happening here.  From looking at the schematics for the AINSER64 module, this appears to be the planned mode of operation as J6 connects to channel 7, J7 to channel 6, etc.  Thanks for any help anyone might be able to provide.  

Jeff

Posted (edited)

Hi,

In ainser.c line 334:
 

      // store conversion value if difference to old value is outside the deadband
      u16 pin = muxed ? (mux_pin_map[mux_ctr] + 8*(7-chn)) : (7-chn); // the mux/chn -> pin mapping is layout dependend

Try this:
 

      // store conversion value if difference to old value is outside the deadband
      u16 pin = muxed ? (mux_pin_map[mux_ctr] + 8*chn) : chn; // the mux/chn -> pin mapping is layout dependend

Yep Next time, better check the ainser64 diagram before reducing it ;)


Best regards
Bruno

Edited by Antichambre
Posted

That's it!  Thank you so much!  Not sure how I missed it since the comment explains it, but I'm very appreciative for your assistance.

Yeah, this was my first time creating a PCB - definitely a learning experience.  I've been surprised at how well everything has actually worked given my lack of experience - the documentation and tutorials for MIDIbox have been amazing.

Thanks

Jeff

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...