Underskor Posted August 4, 2011 Report Share Posted August 4, 2011 (edited) Hi there, I am running an AIN module from Core32, with a single pot connected. I have the AIN_CHANNEL_MASK set to 0x1, and the remaining 7 AIN inputs on the first 4051 grounded. When the pot is adjusted, MIOS Studio reports no activity (APP_AIN_NOTIFYCHANGE() includes debug message listing pin + value). Touching pins on J5C causes jitter activity. Touching pins on AIN:J5 also causes activity. Letting the pot's 4051 input float causes jitter as expected. SmashTV instructed me on #midibox to force the ABC mux control lines to 001 (A>Vd, B+C>Vs) and testing that pin 3 and 13 of the 4051 read the same (unsure how to do so, multimeter on Vs & pin 3/13, or on AIN input 1 and pin 3/13?) Have swapped a couple of 4051s in and out with no change. Note: attached pic was taken before setting up the mux control lines. Hope you guys can help :) Thanks, Tom Edited December 12, 2011 by Underskor Quote Link to comment Share on other sites More sharing options...
Underskor Posted October 10, 2011 Author Report Share Posted October 10, 2011 Anyone? :( Quote Link to comment Share on other sites More sharing options...
sidmonster Posted October 12, 2011 Report Share Posted October 12, 2011 Anyone? :( Your cable from core to AIN looks very unstable. You should remake that cable and clamp it down this time so we can rule that out as the culprit. Quote Link to comment Share on other sites More sharing options...
Underskor Posted December 4, 2011 Author Report Share Posted December 4, 2011 Have been away for a while, exams and stuff. Back into it now though. Clamped the cable down and set the mux control lines up. http://dl.dropbox.com/u/1907812/Images/IMAG0297.jpg Now unable to get any activity, even jitter from floating inputs. Still not 100% on how to do this: SmashTV instructed me on #midibox to force the ABC mux control lines to 001 (A>Vd, B+C>Vs) and testing that pin 3 and 13 of the 4051 read the same (unsure how to do so, multimeter on Vs & pin 3/13, or on AIN input 1 and pin 3/13?) Anything I can try? Quote Link to comment Share on other sites More sharing options...
Underskor Posted December 10, 2011 Author Report Share Posted December 10, 2011 At my wits end here, spent the last few nights trying different things but I can't get anywhere. Removed all 4051s but J5.A0, and grounded AIN:J5.A1-A3Reflowed all AIN joints.Been over the board with a magnifying glass, scraped/brushed between connections cleaned to make sure there were no rogue solder trails (it was light - didn't damage traces)Removed breadboard from the equation. Still getting a large, constant stream of jitter. I am also now getting an "Unrecognised USB device - device has malfunctioned" tooltip on windows XP which I wasn't getting before, however if I use the J27 jumper and load the Bootloader, this notification does not occur. Here is an extract of the jitter so you can get an idea of the volume (if that's relevant): [4598.587] APP_AIN_NotifyChange(6, 63) [4598.588] APP_AIN_NotifyChange(0, 75) [4598.588] APP_AIN_NotifyChange(2, 65) [4598.588] APP_AIN_NotifyChange(4, 71) [4598.588] APP_AIN_NotifyChange(6, 65) [4598.589] APP_AIN_NotifyChange(0, 70) [4598.589] APP_AIN_NotifyChange(2, 64) [4598.589] APP_AIN_NotifyChange(4, 69) [4598.589] APP_AIN_NotifyChange(6, 63) [4598.590] APP_AIN_NotifyChange(0, 75) [4598.590] APP_AIN_NotifyChange(2, 65) [4598.590] APP_AIN_NotifyChange(4, 71) [4598.590] APP_AIN_NotifyChange(6, 65) [4598.591] APP_AIN_NotifyChange(0, 70) [4598.591] APP_AIN_NotifyChange(2, 64) [4598.591] APP_AIN_NotifyChange(4, 69) [4598.592] APP_AIN_NotifyChange(0, 69) [4598.592] APP_AIN_NotifyChange(6, 63) [4598.593] APP_AIN_NotifyChange(0, 75) [4598.593] APP_AIN_NotifyChange(2, 65) [4598.593] APP_AIN_NotifyChange(4, 71) [4598.593] APP_AIN_NotifyChange(6, 65) [4598.594] APP_AIN_NotifyChange(0, 70) [4598.594] APP_AIN_NotifyChange(4, 69) [4598.595] APP_AIN_NotifyChange(0, 69) [4598.595] APP_AIN_NotifyChange(2, 64) [4598.595] APP_AIN_NotifyChange(6, 63) [4598.596] APP_AIN_NotifyChange(0, 75) [4598.596] APP_AIN_NotifyChange(2, 65) [4598.596] APP_AIN_NotifyChange(4, 71) [4598.596] APP_AIN_NotifyChange(6, 65) [4598.597] APP_AIN_NotifyChange(0, 70) [4598.597] APP_AIN_NotifyChange(2, 64) [4598.597] APP_AIN_NotifyChange(4, 69) [4598.597] APP_AIN_NotifyChange(6, 63) [4598.598] APP_AIN_NotifyChange(0, 75) [4598.598] APP_AIN_NotifyChange(2, 65) [4598.598] APP_AIN_NotifyChange(4, 71) [4598.598] APP_AIN_NotifyChange(6, 64) [4598.599] APP_AIN_NotifyChange(0, 70) [4598.599] APP_AIN_NotifyChange(2, 64) [4598.599] APP_AIN_NotifyChange(4, 69) [4598.599] APP_AIN_NotifyChange(6, 63) [4598.600] APP_AIN_NotifyChange(0, 75) [4598.600] APP_AIN_NotifyChange(2, 65) [4598.600] APP_AIN_NotifyChange(4, 71) [4598.600] APP_AIN_NotifyChange(6, 64) [4598.601] APP_AIN_NotifyChange(0, 69) [4598.601] APP_AIN_NotifyChange(2, 63) [4598.601] APP_AIN_NotifyChange(4, 75) [4598.602] APP_AIN_NotifyChange(0, 71) [4598.602] APP_AIN_NotifyChange(4, 69) [4598.603] APP_AIN_NotifyChange(0, 69) [4598.603] APP_AIN_NotifyChange(4, 74) [4598.604] APP_AIN_NotifyChange(0, 70) [4598.604] APP_AIN_NotifyChange(4, 69) [4598.605] APP_AIN_NotifyChange(0, 75) [4598.605] APP_AIN_NotifyChange(2, 65) [4598.605] APP_AIN_NotifyChange(4, 71) [4598.606] APP_AIN_NotifyChange(0, 69) [4598.606] APP_AIN_NotifyChange(2, 63) [4598.606] APP_AIN_NotifyChange(4, 75) [4598.607] APP_AIN_NotifyChange(0, 71) [4598.607] APP_AIN_NotifyChange(4, 69) [4598.608] APP_AIN_NotifyChange(0, 69) [4598.608] APP_AIN_NotifyChange(4, 75) [4598.609] APP_AIN_NotifyChange(0, 71) [4598.609] APP_AIN_NotifyChange(4, 70) [4598.610] APP_AIN_NotifyChange(0, 69) [4598.610] APP_AIN_NotifyChange(4, 75) [4598.611] APP_AIN_NotifyChange(0, 71) [4598.611] APP_AIN_NotifyChange(2, 65) [4598.611] APP_AIN_NotifyChange(4, 70) [4598.612] APP_AIN_NotifyChange(0, 69) [4598.612] APP_AIN_NotifyChange(6, 63) [4598.613] APP_AIN_NotifyChange(0, 75) [4598.613] APP_AIN_NotifyChange(4, 71) [4598.613] APP_AIN_NotifyChange(6, 65) [4598.614] APP_AIN_NotifyChange(0, 70) [4598.614] APP_AIN_NotifyChange(4, 69) [4598.615] APP_AIN_NotifyChange(0, 69) [4598.615] APP_AIN_NotifyChange(2, 64) [4598.615] APP_AIN_NotifyChange(6, 63) [4598.616] APP_AIN_NotifyChange(0, 75) [4598.616] APP_AIN_NotifyChange(2, 65) [4598.616] APP_AIN_NotifyChange(4, 71) [4598.616] APP_AIN_NotifyChange(6, 65) [4598.617] APP_AIN_NotifyChange(0, 70) [4598.617] APP_AIN_NotifyChange(2, 64) [4598.617] APP_AIN_NotifyChange(4, 69) [4598.617] APP_AIN_NotifyChange(6, 63) [4598.618] APP_AIN_NotifyChange(0, 75) [4598.618] APP_AIN_NotifyChange(2, 65) [4598.618] APP_AIN_NotifyChange(4, 71) [4598.618] APP_AIN_NotifyChange(6, 64) [4598.619] APP_AIN_NotifyChange(0, 70) [4598.619] APP_AIN_NotifyChange(2, 64) [4598.619] APP_AIN_NotifyChange(4, 69) [4598.619] APP_AIN_NotifyChange(6, 63) [4598.620] APP_AIN_NotifyChange(0, 75) [4598.620] APP_AIN_NotifyChange(2, 65) [4598.620] APP_AIN_NotifyChange(4, 71) [4598.620] APP_AIN_NotifyChange(6, 64) [4598.621] APP_AIN_NotifyChange(0, 69) [4598.621] APP_AIN_NotifyChange(2, 63) [4598.621] APP_AIN_NotifyChange(4, 75) [4598.622] APP_AIN_NotifyChange(0, 71) Here's the relevant code. #ifndef _MIOS32_CONFIG_H #define _MIOS32_CONFIG_H #define MIOS32_AIN_CHANNEL_MASK 0x000f #define MIOS32_AIN_OVERSAMPLING_RATE 1 #define MIOS32_AIN_DEADBAND 31 #define MIOS32_AIN_DEADBAND_IDLE 127 #define MIOS32_AIN_IDLE_CTR 3000 #define MIOS32_AIN_MUX_PINS 1 #define MIOS32_AIN_MUX0_PIN GPIO_Pin_4 // J5C.A8 - 4 #define MIOS32_AIN_MUX0_PORT GPIOC #define MIOS32_AIN_MUX1_PIN GPIO_Pin_5 // J5C.A9 - 5 #define MIOS32_AIN_MUX1_PORT GPIOC #define MIOS32_AIN_MUX2_PIN GPIO_Pin_0 // J5C.A10 - 0 #define MIOS32_AIN_MUX2_PORT GPIOB #endif extern "C" void APP_AIN_NotifyChange(u32 pin, u32 pin_value) { // toggle Status LED on each AIN value change MIOS32_BOARD_LED_Set(1, ~MIOS32_BOARD_LED_Get()); // convert 12bit value to 7bit value u8 value_7bit = pin_value >> 5; // send MIDI event //MIOS32_MIDI_SendCC(DEFAULT, Chn1, pin + 0x10, value_7bit); //Send debug message MIOS32_MIDI_SendDebugMessage("APP_AIN_NotifyChange(%u, %u)", pin, value_7bit); } Pictures: http://dl.dropbox.com/u/1907812/Images/IMAG0302.jpg http://dl.dropbox.com/u/1907812/Images/IMAG0301.jpg Quote Link to comment Share on other sites More sharing options...
nILS Posted December 10, 2011 Report Share Posted December 10, 2011 The sheer amount of data sent can cause the USB connection to become unstable. USB power and 3.3V AINs have a tendency to lead to jitter. Cranking up the deadband a bit more of manually filtering the values might be a suitable workaround. Cleaner (non-usb-)power would probably stop the jitter. Quote Link to comment Share on other sites More sharing options...
Underskor Posted December 12, 2011 Author Report Share Posted December 12, 2011 Success! Sidmonster was on the right track but I remade the wrong cable. >_< After much help from SmashTV (he's going to hate me for this), it turns out that the culprit was this guy: It was connecting the mux control lines from the Core to the AIN, and 2 of the pins was slightly bent and had not broken through the cable and made a connection, which is why my control lines were only ever set to Low/Low/High and stuck reading J1.A5, not reading the single pot I had connected at J1.A0 (I think). To read the pot, I forced the lines on AIN.J6 to High/Low/High (A to Vd, B to Vs, C to Vd) which corresponds to pin 5 of the 4051 (as seen in datasheet - page 4 truth table). Pin 5 of the 4051 is J1.A0 - my pot! Looks to be working! Very happy. Big thanks to SmashTV and the guys on #midibox, it was all them. Hope this thread helps someone out one day! 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.