lichtuberstromt Posted November 21, 2019 Report Share Posted November 21, 2019 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 Quote Link to comment Share on other sites More sharing options...
latigid on Posted November 21, 2019 Report Share Posted November 21, 2019 If I recall, the pin order was determined by PCB layout (might have something to do with the AINSER64 too? So backwards scanning it is if you use the MIOS routine. Quote Link to comment Share on other sites More sharing options...
Antichambre Posted November 21, 2019 Report Share Posted November 21, 2019 (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 November 21, 2019 by Antichambre Quote Link to comment Share on other sites More sharing options...
lichtuberstromt Posted November 21, 2019 Author Report Share Posted November 21, 2019 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.