1st time COMPARATOR use...


Results 1 to 8 of 8

Threaded View

  1. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Hi Roger,

    With a voltage divider of 22k and 10k, when the batt voltage is 6.5, the divider output will be 2.031 volts.

    But the VRCON setting is for 2.5V. So it would switch at a batt voltage of 8 volts instead of 6.5

    If VRCON were %10101010 it would give a reference of 2.08 V, and the comparator would switch at 6.66V.
    <hr>
    For the comparator you can use this configuration...

    <img src=http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1700&stc=1&d=118082173 6>

    With CIS set to 1 it puts the GP0 input on the "-" input of the comparator.
    Then as long as the batt is greater than 6.66V, the comparator output will be 0

    In that case, CMCON should be %00001110.

    HTH,

    PS: Do you play Half-Life? Roger(SWE)?
    <br>
    Attached Images Attached Images  
    DT

Similar Threads

  1. I don't understand this code!
    By Russ Kincaid in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 13th February 2008, 02:55
  2. Measuring time
    By AugustoPedrone in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 30th July 2007, 23:46
  3. Serout2/serin2 Pbp Problem
    By SOMRU in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 11th December 2006, 19:55
  4. Alarm Time
    By Santana in forum Code Examples
    Replies: 1
    Last Post: - 8th December 2006, 13:58
  5. Timer in real time
    By martarse in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 29th July 2005, 14:24

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