I build a midi controller on v-usb(running on atmega48, HID driver), it consist of 23 analog feider and 16 buttons(using 'mux'). I have a problem - on pc with winXP it works great, but on win7 it only half-working - buttons don't work, and on another pc buttons don't work even on winXP, i am confused. See this code
Code: Select all
din()
{....
midiMsg[0] = 0x0b;
midiMsg[1] = 0xb1; //b1 DIN!!!
midiMsg[2] = controll*8 + row;
if(1& (input[controll]>>row)) sett = 0xff;
else sett = 0;
midiMsg[3] = sett;
}
ain()
{...
midiMsg[0] = 0x0b;
midiMsg[1] = 0xb0; //B0 AIN
midiMsg[2] = controll;
midiMsg[3] = value; //>> 3; //naaea a ADC()
}
"ain" its function operational with analog input(feiders, ADC on atmega), "din" deals with buttons. Diffents beetwen "din" and "ain" is only second byte of midi_message. I even can replace "midiMsg[1] = 0xb1"(din) with "midiMsg[1] = 0xb0", i think it will be work, but i don't understand - why it wouldn't work so? On my pc with winXP it work propely, on second winXP it doesn't work!
What do you think about it?