|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Cypress Board Analog Input Help Needed
I'm seeing something very strange with the analog inputs on J2/J3 on our Cypress IO board. I have a potentiometer wired so that Pin 1 on J2 (VDDIO) is on one side of the pot and pin 14 (GND) is on the other end of the pot.. Pin2/P0_0/AI1 is connected to the potentiometer wiper. I'm watching the IO tab on the driver station as I move the wiper, AI1 is steady at about 50%, but _all_ the other analog inputs (AI2-AI8) follow the potentiometer. When I attach the wiper to AI3, AI1-AI3 are steady and AI4-AI8 follow the wiper. I've put a volt meter between the wiper and ground and it's acting exactly as I'd expect -- voltage varying continuously between 0-3.3V. What am I doing wrong?
Here's some addition information: (1) I'm watching all this in the driver station software. There is no robot active, (2) The board has been setup up in enhanced IO mode with all 16 digital ports configured as pulled down inputs. (3) I have flashed the board with the V2 hex file. (4) I've borrowed a second board from another local team and saw the exact same behaviour on that board. (5) J1 and J4 are jumpered for 3.3V -- basically I haven't touched them. Thanks in advance |
|
#2
|
|||
|
|||
|
Re: Cypress Board Analog Input Help Needed
I saw the same behavior with last year's and this year's firmware. Do you have any signals running to the other inputs, or just the one pot? I ended up pulling the rest up manually last year because we were using some of the analog input lines for push button switches (ran out of IO) and the joystick moving to one side would pull the rest down a bit and trigger the switch. This year I just left them because we aren't using any other analog inputs either than 2 pots for our joysticks.
Is it common for a floating ADC input to swing with the other ports? It seems like this is caused by some high impedance connection between the input pins. |
|
#3
|
|||
|
|||
|
Re: Cypress Board Analog Input Help Needed
I have about 9 or 10 digital inputs, but nothing else analog, so those pins are unconnected. We are using the stock joysticks and they are connected via USB hub to one of the USB inputs on the classmate.
One thing I forgot to verify is if the other analog lines are following the AI1 voltage directly or are inverted. |
|
#4
|
||||||
|
||||||
|
Re: Cypress Board Analog Input Help Needed
It's common for there to only be one ADC on a microcontroller, and use a mux to select each one to sample one at a time. If the input is floating, and the mux switches to it, the previous sample is retained. That's what's happening in this case.
|
|
#5
|
|||||
|
|||||
|
Re: Cypress Board Analog Input Help Needed
It's normal for the unused lines to follow the previous analog input.
The last analog voltage sampled will linger until new input voltage replaces it. |
|
#6
|
|||
|
|||
|
Re: Cypress Board Analog Input Help Needed
Well that explains it. I just checked the wiring on our potentiometer. It's plugged into AI2!! (the J3 side not J2). So AI2 is tracking the pot and the other floating AI's are simply tracking AI2.
Thanks everyone. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|