I'm using the J/W 20 A8-8 with a potentiometer wired as recommended. I am getting its position by reading the Windows JoyInfoEx structure. However, I am only getting 7-bit resolution (128 steps).
I have calibrated it using the windows joystick calibration tool. This is in Windows Me.
Can anyone suggest why I am not seeing the full 8-bit resolution of the ADC chip?
JoyWarrior 20 A8-8 Resolution
Moderator: Guido Körber
-
- Posts: 3
- Joined: Mon Nov 01, 2004 1:18 pm
- Location: UK
-
- Site Admin
- Posts: 2856
- Joined: Tue Nov 25, 2003 10:25 pm
- Location: Germany/Berlin
- Contact:
Re: JoyWarrior 20 A8-8 Resolution
What does this mean: You are getting only 128 steps? The values should range from 0 to 255 unless you are using a pot that is way off the 100K.
-
- Posts: 3
- Joined: Mon Nov 01, 2004 1:18 pm
- Location: UK
Hi Guido,
Actually the pot is a 22K, but since it is used as a potential divider in the 20A8-8, that doesn't matter - the ADC is reading a voltage.
The situation is more complex than I thought. This is what I'm seeing in Win Me:
XPos range is either 0 - 65024, in steps of 512, ie.
0 / 512 / 1024 / etc.
OR: 256 - 65280 in steps of 512, ie.
256 / 768 / 1280 / etc.
So there are 2 possible scales, each with 128 values. The device changes from one scale to the other randomly as you move the slider of the pot, eg. with the slider on the bottom, it reads 0; move it up and back down again, now it reads 256.
I tried it on my XP laptop, and it's even stranger. There are 2 scales again, but now they go:
0 / 485 / 970 / 1456 / .... / 65535
and:
242 / 728 / 1213 / 1699 / ... / 65535
I should point out that I went through the Windows joystick calibration routine on both computers. Perhaps this is the cause of the problem?
Chris
Actually the pot is a 22K, but since it is used as a potential divider in the 20A8-8, that doesn't matter - the ADC is reading a voltage.
The situation is more complex than I thought. This is what I'm seeing in Win Me:
XPos range is either 0 - 65024, in steps of 512, ie.
0 / 512 / 1024 / etc.
OR: 256 - 65280 in steps of 512, ie.
256 / 768 / 1280 / etc.
So there are 2 possible scales, each with 128 values. The device changes from one scale to the other randomly as you move the slider of the pot, eg. with the slider on the bottom, it reads 0; move it up and back down again, now it reads 256.
I tried it on my XP laptop, and it's even stranger. There are 2 scales again, but now they go:
0 / 485 / 970 / 1456 / .... / 65535
and:
242 / 728 / 1213 / 1699 / ... / 65535
I should point out that I went through the Windows joystick calibration routine on both computers. Perhaps this is the cause of the problem?
Chris
-
- Site Admin
- Posts: 2856
- Joined: Tue Nov 25, 2003 10:25 pm
- Location: Germany/Berlin
- Contact:
-
- Posts: 3
- Joined: Mon Nov 01, 2004 1:18 pm
- Location: UK
-
- Site Admin
- Posts: 2856
- Joined: Tue Nov 25, 2003 10:25 pm
- Location: Germany/Berlin
- Contact: