• AVR Freaks

AnsweredHot!Appearance of heavy pull-down on PIC32MX AN (ADC) inputs

Author
Mic
New Member
  • Total Posts : 9
  • Reward points : 0
  • Joined: 2019/03/12 16:18:04
  • Location: 0
  • Status: offline
2019/03/20 05:26:24 (permalink)
0

Appearance of heavy pull-down on PIC32MX AN (ADC) inputs

I'm trying to setup some AN inputs. The conversion seems to work properly, I get readings from the ports indicating that the ports are probably not faulty.
 
However, there seems to be a hefty sort of pull-down on (at least) AN0 through AN5. Even when I connect the 3.3v with a 560ohm resistor directly to one of the inputs, I still measure only a few mV's on the input pins, and the readings from the ADC are no higher than 29 out of the full 10-bit range.
 
I've checked 4 times already, but I can't seem to find any sort of indication of a wrongly setup for the ports.
 
I'm using the Ethernet Starter kit 2 with the Starter kit expansion board. Neither witch seems to have any sort of extra components in the path of the AN pins. I have the feeling I'm seriously overlooking something.
#1
qhb
Superb Member
  • Total Posts : 9998
  • Reward points : 0
  • Joined: 2016/06/05 14:55:32
  • Location: One step ahead...
  • Status: offline
Re: Appearance of heavy pull-down on PIC32MX AN (ADC) inputs 2019/03/20 06:01:58 (permalink) ☼ Best Answerby Mic 2019/03/20 07:00:33
0
You haven't accidentally cleared the TRIS bit for that pin, turning the pin into an output?
 

Nearly there...
#2
Mic
New Member
  • Total Posts : 9
  • Reward points : 0
  • Joined: 2019/03/12 16:18:04
  • Location: 0
  • Status: offline
Re: Appearance of heavy pull-down on PIC32MX AN (ADC) inputs 2019/03/20 06:46:07 (permalink)
0
No I didn't, but apparently Harmony did.
 
What seems to have happened: Harmony decided the pins were AN in when I started the project, and configuring them on startup like that. That way they're "Locked" in the pin manager. Which made me assume I wasn't able to change the TRIS of those pins, as they were greyed out and marked with "n/a". However, after further investigation it seemed that the TRIS pins weren't set at all in the config file.
In order to make sure my config file in HMC stayed in sync with the actual configuration, I unlocked the pins, and reassigned them in HMC pin manager, which did prompt me to change the TRIS this time.
And it worked.
 
Thank you very much. Another sign that HMC isn't necessarily right. 
#3
qhb
Superb Member
  • Total Posts : 9998
  • Reward points : 0
  • Joined: 2016/06/05 14:55:32
  • Location: One step ahead...
  • Status: offline
Re: Appearance of heavy pull-down on PIC32MX AN (ADC) inputs 2019/03/20 12:14:18 (permalink)
0
Normally, all TRIS registers power up with all pins set as input anyway.
Is this code being loaded by a bootloader, or is there anything else that could have already set the pin to be an output?
 

Nearly there...
#4
Jump to:
© 2019 APG vNext Commercial Version 4.5