vusb joystick analog problem
Posted: Mon Mar 07, 2016 11:00 am
Hi,
i've build a working vusb with hid mouse example from vusb download package. Now i modified them a bit to become gamepad. After googling a bit and read a bit from some places, i got the buttons working, and later adc working. but there is a bit problem with the adc return value. it's a bit jumpy, not jumpy like go up and down, but jumpy like not smooth transition. so every little potentiometer change it doesn't showed up in properties, until some turn it changed but it jumped a bit far. later i tried to exclude the adc process, and using normal incremental local variable as report value. It turned out it has same jumpy symptom. now i am confused. where is the problem actually?
this is my main.c code : http://pastebin.com/tPEUm7G9
this is my usbconfig.h code: http://pastebin.com/aBDf0zZn
my hardware is same like with-series-diode picture on vusb download package,except the xtal is 12mhz.
any help appreciated. Thanks in advance.
i've build a working vusb with hid mouse example from vusb download package. Now i modified them a bit to become gamepad. After googling a bit and read a bit from some places, i got the buttons working, and later adc working. but there is a bit problem with the adc return value. it's a bit jumpy, not jumpy like go up and down, but jumpy like not smooth transition. so every little potentiometer change it doesn't showed up in properties, until some turn it changed but it jumped a bit far. later i tried to exclude the adc process, and using normal incremental local variable as report value. It turned out it has same jumpy symptom. now i am confused. where is the problem actually?
this is my main.c code : http://pastebin.com/tPEUm7G9
this is my usbconfig.h code: http://pastebin.com/aBDf0zZn
my hardware is same like with-series-diode picture on vusb download package,except the xtal is 12mhz.
any help appreciated. Thanks in advance.