Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Voltage to PWM output conversion

Status
Not open for further replies.
Hi all

Fairly new to this game so please be gentle.

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.

Thanks
Steve
 
Building_A_Robot_Fish said:
Hi all

Fairly new to this game so please be gentle.

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.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top