Beginner in need of help !!


Closed Thread
Results 1 to 40 of 72

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,636


    Did you find this post helpful? Yes | No

    Default Re: Beginner in need of help !!

    the low range internal vref gives you 15 steps of 0.208 volt steps starting at 0v
    the high range internal vref gives you 15 steps of 0.156 volt steps starting at 1.25v

    if you don't need the cout as an actual physical output CM<2:0> = 110 is a better choice
    and lets you chose pin 6 or 7 as your input (select with cmcon0.3 "CIS")
    why waste pins on a 8 pin chip

    0000=0
    0001=1
    0010=2
    0011=3
    ...................etc etc
    its called binary
    Last edited by richard; - 24th January 2015 at 10:16. Reason: binary

  2. #2
    Join Date
    Jan 2015
    Posts
    45


    Did you find this post helpful? Yes | No

    Default Re: Beginner in need of help !!

    Edit: just re-read your post. I need to be able to read a pin & output on it at the same time (obviously with pauses, so do I need to use comparator with output?

    Hi Richard, I just came back here from doing a bit of googleing. It took me about 2 mins to figure out that its just binary, maybe if I had paid more attention in Maths I would know this!

    I now understand the voltage steps as well, everything is coming together now, its actually quite simple once understood.

    I still need to know if you can use a comparator with internal reference on any pin or does it have to be the CIN- pin?

    Cheers,
    Rob
    Last edited by robbo78; - 24th January 2015 at 10:24.

  3. #3
    Join Date
    May 2013
    Location
    australia
    Posts
    2,636


    Did you find this post helpful? Yes | No

    Default Re: Beginner in need of help !!

    if you don't need the cout as an actual physical output CM<2:0> = 110 is a better choice
    and lets you chose pin 6 or 7 as your input (select with cmcon0.3 "CIS")
    input to comparator is [ cin+ pin 7] or [cin- pin 6] with CM<2:0> = 110 its your choice

    there are other modes but in all cases cin is only on pins 6,7

  4. #4
    Join Date
    May 2013
    Location
    australia
    Posts
    2,636


    Did you find this post helpful? Yes | No

    Default Re: Beginner in need of help !!

    if you need or can use the comparator output use CM<2:0> = 101
    it still lets you chose pin 6 or 7 as your input (select with cmcon0.3 "CIS")

  5. #5
    Join Date
    Jan 2015
    Posts
    45


    Did you find this post helpful? Yes | No

    Default Re: Beginner in need of help !!

    Okay Richard thanks for your help.

    So lets say I wanted an LED to be OFF if the voltage on cin+ is below 1.1v, & LED to be ON if the voltage is higher than 1.1v. Would I use this -

    VR3 ... VR0 = 1000 (8) with a VDD of 3.3V the Vref will be (8/24) x 3.3 = 1.1V

    I hope this is right lol

  6. #6
    Join Date
    May 2013
    Location
    australia
    Posts
    2,636


    Did you find this post helpful? Yes | No

    Default Re: Beginner in need of help !!

    there is not enough info to answer

    what comparator mode ?
    what cis setting
    is vrr set
    what cinv seting
    how is led connected ?
    Last edited by richard; - 24th January 2015 at 11:42. Reason: spell

  7. #7
    Join Date
    Jan 2015
    Posts
    45


    Did you find this post helpful? Yes | No

    Default Re: Beginner in need of help !!

    Richard, I'm specifically talking about just the VRR nothing else. I just want to know if I've got the workings out right. If you need the whole code to tell me if that part is right or not then I can do that no problem.

  8. #8
    Join Date
    May 2013
    Location
    australia
    Posts
    2,636


    Did you find this post helpful? Yes | No

    Default Re: Beginner in need of help !!

    that is correct it will set the reference to 1.1 for a vdd of 3.3v

Similar Threads

  1. Beginner help!
    By Recognize in forum General
    Replies: 14
    Last Post: - 26th April 2012, 14:55
  2. pic24 beginner
    By robertpeach in forum General
    Replies: 23
    Last Post: - 13th August 2009, 11:57
  3. need help! to beginner
    By emilhs in forum mel PIC BASIC Pro
    Replies: 27
    Last Post: - 6th May 2009, 18:44
  4. Beginner at PB
    By alphahr in forum Off Topic
    Replies: 1
    Last Post: - 21st April 2008, 17:43
  5. Can anyone help a beginner in a struggle?
    By douglasjam in forum mel PIC BASIC
    Replies: 1
    Last Post: - 5th May 2005, 23:29

Members who have read this thread : 1

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