PDA

View Full Version : Read two ADC Channels on 12F615



Aussie Barry
- 23rd May 2011, 12:18
Hi All

I want to read two ADC channels on a 12F615.
How can I select two channels at the same time?
The ADCON0 register allows me to set one only (ie AN0 or AN1 or AN2 or AN3 but not AN0 and AN1 etc).
Do I need to select one channel, perform the ADCIN reading and then select the second channel for the next ADCIN read?

My project is simple - turn on a 6V pump for a short period (10 to 30 seconds datermined by one pot setting), wait a longer period (20 min to 120 min determined by a secind pot setting) and then loop for ever (or until turned off). I have no problems switching the pump via a MOSFET; I am just trying to determine how to read the two pot settings for my time settings.

Any help would be greatly appreciated.

Cheers
Barry

cncmachineguy
- 23rd May 2011, 12:45
You have to read 1 at a time

Aussie Barry
- 28th May 2011, 17:38
I have written my code for the PIC12F615 but am now having problems compiling it with MPLAB IDE. I get an error message saying it can't find the 12F615.bas file.
I am using PBP Ver 2.47 but am not sure if this program supports the 12F615.

Am I missing something here? Should I be able to program this device?

Any help would be greatly appreciated.

Cheers
Barry

Bruce
- 28th May 2011, 19:30
Support for the 12F615 was added back in v2.50. You need to upgrade.

dhouston
- 28th May 2011, 20:05
Support for the 12F615 was added back in v2.50. You need to upgrade.And, I suppose I'll need 2.60 for the 18F25K20.

Bruce
- 28th May 2011, 20:14
2.50 added support for that one, but I didn't think you used PICs beyond the 8-pinners and and occasional 16F688 or 16F88..;o)

dhouston
- 28th May 2011, 21:03
2.50 added support for that one, but I didn't think you used PICs beyond the 8-pinners and and occasional 16F688 or 16F88..;o)I'm just trying to cover all the bases. I'll say more in the Amicus Shields thread so I don't hijack this one.