Sorry, yet ANOTHER mod question


Results 1 to 9 of 9

Threaded View

  1. #5
    Join Date
    Dec 2007
    Location
    Finland
    Posts
    191


    Did you find this post helpful? Yes | No

    Default Re: Sorry, yet ANOTHER mod question

    What kind of voltage divider you are using?
    If you try to get full 0-5V scale with 0-15V input, then you should use 1:3 ratio (e.g. 22kOhm and 11kOhm resistors) to get best measurement accuracy.

    With this divider 15V -> 5V (and 0V -> 0V) at ADC input pin, ADC should show 255 (8bit) or 4095 (12bit).

    Math to show input voltage based on ADC value.
    8bit ADC:
    Code:
    VOLTS_VAL = (15 * VOLTS_IN)/255
    12bit ADC:
    Code:
    VOLTS_VAL = (15 * VOLTS_IN)/4095
    Last edited by Gusse; - 30th January 2014 at 11:18.

Similar Threads

  1. Help with Pic Delay code mod please
    By g7jiq in forum General
    Replies: 1
    Last Post: - 26th March 2009, 00:06
  2. ERROR: Macro MOD?TCB not found in macro file.
    By JohnP in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 17th February 2009, 19:10
  3. 18F4620 HPWM Half Bridge Mod problem
    By showtime in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 2nd November 2007, 12:55

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