Read two ADC Channels on 12F615


Closed Thread
Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Jan 2011
    Location
    Sydney, Australia
    Posts
    172

    Default Read two ADC Channels on 12F615

    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

  2. #2
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default Re: Read two ADC Channels on 12F615

    You have to read 1 at a time
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  3. #3
    Join Date
    Jan 2011
    Location
    Sydney, Australia
    Posts
    172


    Did you find this post helpful? Yes | No

    Default Re: Read two ADC Channels on 12F615

    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

  4. #4
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default Re: Read two ADC Channels on 12F615

    Support for the 12F615 was added back in v2.50. You need to upgrade.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  5. #5
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default Re: Read two ADC Channels on 12F615

    Quote Originally Posted by Bruce View Post
    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.

  6. #6
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default Re: Read two ADC Channels on 12F615

    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)
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts