Changing Reference Voltage A/D on Microcontroller

microchipmicrocontroller

I am using a microcontroller PIC18F4550. It has a reference voltage from 0 – 3.3 volts for the A/D converters.

I had two questions:

1) If the voltage drops below 0 (negative), will the A/D converter report the negative value?

2) Is there anyway to change the reference voltage, either by adding an additional circuit or by manipulating it by code?

Thank you!

Best Answer

  1. If the voltage drops below zero you could damage the chip, so don't let that happen. Absolute maximum ratings on the device say -0.3V is the lowest you should go.

  2. You can add an external reference on AN3 and AN2 by the look of it. If you check out the datasheet it shows that usually the reference is Vdd, but you can connect it to external pins instead. You'll have to change a register in software to use that external reference. All this is standard stuff for micros.