ADC in 12F683; puzzled


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default

    Not sure if you're sorted, but as someone who recently struggled with this very type of same thing, here are the 12F683 commands towards helping you out ...

    If using 10 bit AtoD, then right justify is required**.....

    ADCON0.7 = 1 (right justifies your 12F683 AtoD result)

    .....whereas with 8 bit AtoD, left justify is required....

    ADCON0.7 = 0 (left justifies your 12F683 AtoD result)

    and finally this one....

    CMCON0 = 0 (turns the pesky 12f683 comparator off - of course if you need the PIC's comparator, then it's not pesky at all & this command should not be used!)

    Good luck!



    ** and no matter how many times I read the datasheet with respect to left/right justifying, I end feeling like an amoeba being wafted around the bottom of a refuse tip pond.
    Last edited by HankMcSpank; - 23rd September 2010 at 16:35.

  2. #2
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    mikebike, Here is something I thru together last year for quick motor control pwn controller. Try it... The A/D works just fine.. You can get rid of the 64 samples...

    Dave Purola,
    N8NTA
    Attached Files Attached Files

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