12 bit A2D on 18F46K80, need a bit of help for figuring TAD and getting correct value


Closed Thread
Results 1 to 18 of 18

Hybrid View

  1. #1
    Join Date
    Jan 2011
    Location
    Sydney, Australia
    Posts
    173


    Did you find this post helpful? Yes | No

    Default Re: 12 bit A2D on 18F46K80, need a bit of help for figuring TAD and getting correct v

    Hi,

    If you change your voltage divider to a 50%-50% configuration (say 4k7 and 4k7) and then set the reference voltage for the ADC to internal 4.096V, each step of the ADC will equate 0.5mV
    Multiply your ADC reading by two and then manipulate the result to read "X.XXX Volts" per Henrik's LCDOUT routine.
    Yes, I understand there may be some slight inaccuracies but I have found this approach to be quite effecting in recent projects.

    Cheers
    Barry
    VK2XBP

  2. #2
    Join Date
    Sep 2007
    Location
    Waco, Texas
    Posts
    151


    Did you find this post helpful? Yes | No

    Default Re: 12 bit A2D on 18F46K80, need a bit of help for figuring TAD and getting correct v

    Henrik-
    That looks like a cool way to do this, I have never used these operators, but I will try them all, just to see more about them.
    It looks much more efficient than what I had done - multiple dividing......

    Thanks! I will let you know how it turned out.
    -Steve
    "If we knew what we were doing, it wouldn't be called research"
    - Albert Einstein

  3. #3
    Join Date
    Sep 2007
    Location
    Waco, Texas
    Posts
    151


    Did you find this post helpful? Yes | No

    Default Re: 12 bit A2D on 18F46K80, need a bit of help for figuring TAD and getting correct v

    Barry-
    I understand what you are saying, and yes, I am using the internal 4.1 reference - 1st time in fact to rely on an internal!. I was trying to use more of the available resolution on the ADC. If I do a 50% voltage divider, I have 2.5 volts against a 4.096 voltage reference. The divider I am using, uses more of the resolution of the 4.096 reference, 3.23 volts against 4.096 which gives me a little headroom above 5 volts.

    I have done that in the past, but felt that I left some resolution on the table. This way does work, perhaps not straightforward, but I think it does give me more bits of resolution that can be used.

    That being said, if I hadn't found a way (though it was more clunky than Henrik's) - I was sure thinking of doing just that!

    Thanks and Regards to All,
    Steve
    "If we knew what we were doing, it wouldn't be called research"
    - Albert Einstein

Similar Threads

  1. How do I use 10 bit A/D on 8 bit Pic? 12F675
    By polymer52 in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 1st April 2020, 20:10
  2. Replies: 1
    Last Post: - 12th March 2012, 23:34
  3. Averaging 16 bit values without using 32 bit math
    By sirvo in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 5th October 2007, 22:18
  4. LCDOUT 4-bit data on 8-bit setting
    By breesy in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 26th June 2006, 18:39
  5. Help 14-bit and 16-bit Core
    By jetpr in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 14th September 2005, 03:29

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