I'm looking for a device or method that will take a voltage of up to 5v as input and provide a PWM output that I can decode with a PIC to determine the voltage. The PIC has A/D converters on-board but they're already in use and I've insufficient input pins left to use the A/D conv modules I've seen.
I'm looking for a device or method that will take a voltage of up to 5v as input and provide a PWM output that I can decode with a PIC to determine the voltage. The PIC has A/D converters on-board but they're already in use and I've insufficient input pins left to use the A/D conv modules I've seen.
It would look to be far easier to use one of the existing internal A2D inputs, simply add a CMOS switch on the A2D input, and switch it using the spare I/O pin you have. The CMOS switches come with more than one switch, so you could do it for a number of analogue inputs.
This is actually how the PIC works internally, it only has one A2D, the pins are switched to it in turn by CMOS switches.
Failing that, you could re-evaluate your requirements, and try and free up one of the existing A2D inputs, but the CMOS switch idea should work perfectly.