ADCIN question


Closed Thread
Results 1 to 5 of 5

Thread: ADCIN question

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    IOFSCS_8MHZ     Hmmm, dyslexia day at Microchip

    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2858&stc=1&d=122145428 7" /><!-- Name:  IOSCFS.gif
Views: 547
Size:  2.1 KB -->

    Your device line is OK, just pointing out an oddity.
    <hr>

    > how do I figure out what value will get placed in the Vin variable?

    1 decimal place ...
    Code:
    Volts = (Vin+1) */ 50
    2 decimals ...
    Code:
    Volts = (Vin+1) */ 500
    DT

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


    Did you find this post helpful? Yes | No

    Default

    I read that question again, and maybe you want the other way around.

    > how do I figure out what value will get placed in the Vin variable?

    With 8-bit resolution, the values will range from 0 to 255.

    If the input is 2.5 volts, then the value that gets placed in Vin will be ...

    255 / (5 / 2.5) = 127

    For 0.7v that's ...

    255 / (5 / 0.7) = 35

    hth,
    DT

  3. #3


    Did you find this post helpful? Yes | No

    Default

    thanks! all!. This is all quite new to me. the last thing I programed was some cfd in fortran 95, so the hardware side of things is different.

    I think I may end up going to a PIC12F683 just for flexibility, as I can still (barely) fit it on the circuit board I am making.

Similar Threads

  1. ADCIN and PIC18F4331 Arghhhhh !
    By GrandPa in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 6th December 2010, 20:27
  2. ADCIN Sampleus time question
    By LinkMTech in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 17th February 2009, 18:28
  3. Please answer my first question
    By John_001 in forum Off Topic
    Replies: 1
    Last Post: - 15th September 2006, 06:49
  4. really simple adcin question
    By kitcat in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 21st April 2006, 09:06
  5. help using adcin
    By harryweb in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 31st January 2006, 07:46

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