Comparator Help reqd


Closed Thread
Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    257


    Did you find this post helpful? Yes | No

    Default

    Hi Rob,

    At this stage, I'm just learing the basics (with a 16F628A), so I'm not ready to decide on a chip for that reason. (But thanks for the info)

    I have been able to get the comparator working using an external Vref by resistive divider network, and it works quite well. This I am ok with. (thanks to mister_e's simple code example).

    However, no luck when trying to use the internal voltage reference.
    I think this is my problem...

    The datasheet is not very clear when setting the VCON VR<3:0>: bits.

    For example, the datasheet states that the voltage reference specs should be
    3.0V < VDD < 5.5V

    But by following the formula for configuring the voltage reference I get values between:
    0 to 3.13V for VRR=1 and
    1.25 to 3.59V for VRR=0,
    assuming VDD=5V.

    Also, on another matter, if we want to output the internal Vref to RA2, (to monitor this voltage), should we set TRISA.2 to an output pin?

    Any Ideas?

  2. #2
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    257


    Did you find this post helpful? Yes | No

    Smile Solution Found!

    Ok,

    I have searched this forum and found a good link to Melanie's Comparator Tutorial. Fantastic, even for a dummy like me.

    http://list.picbasic.com/forum/messa...tml?1020960642

    Hope this helps anyone else out there.

    J

  3. #3
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Goodness... I didn't think that old thread was still in existance - let alone folks reading it!

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