Jump to content

ADC is giving incorrect warning that pin is output


Recommended Posts

  • Member

I am trying to do a simple test to measure the output of the DAC using the ADC. The datasheet for the DAC states very clearly that if you have enabled the DAC output pin this will override any pin output functions including the digital output (TRIS) the weak pull-ups and the digital input threshold circuit (so ANSEL behaves like it is set to 1):


But MCC is generating a warning saying that my setup is incorrect.


Since the output settings are overriden when the pin is a DAC output this warning should not be created when the pin is a DAC output which makes it behave as needed. Besides there should not be any problem measuring an output pin using the ADC when it is an output anyway? I do not understand why the warning is claiming that it "requires" this pin to be set as input. 

Perhaps it would be better if the warning said "this pin is being driven by the device, if you are trying to measure an external voltage this will interfere with your readings, you can avoid this by disabling the pin output drivers by making the pin an input" or something to that extent?

Required Boilerplate:

Component Version
Device PIC18F74K40
MCC 3.75
MPLAB-X 5.10
Foundation Services 0.1.31
PIC18 Lib 1.76.0
Link to comment
Share on other sites


This topic is now archived and is closed to further replies.


  • Create New...