help setting up 16F886 for ADC


Closed Thread
Results 1 to 17 of 17

Hybrid View

  1. #1
    Join Date
    Jan 2014
    Posts
    84


    Did you find this post helpful? Yes | No

    Default Re: help setting up 16F886 for ADC

    Thank you very much Richard !

    Now I see that 100 iterations overflowing a word var, so I'll use 10 iteration or DT Average routine, but nevermind right now.

    I know it's unpleasant to ask beginners an advanced but you can explain me how its made middle 16 bits of multiplication calculation, please ? ( mvolt = tc */ 1249 )

    Also I'm confused about "40 deg = 4500 mv would be a 921 count" , the maximum scale what I need is 1750 mV, 40 deg = 900mv ( 40 deg = 400mV + 500mV = 900mV) .

    Please do not mind that I ask so many aberrations, but for me there are things I could not understand ...I'm old man and also beginner in programming.

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,680


    Did you find this post helpful? Yes | No

    Default Re: help setting up 16F886 for ADC

    Also I'm confused about "40 deg = 4500 mv would be a 921 count" , the maximum scale what I need is 1750 mV, 40 deg = 900mv ( 40 deg = 400mV + 500mV = 900mV)
    I must have up past my bedtime , managed to multiply 40 * 10 mv and got 4000


    (
    Code:
      mvolt = tc */ 1249  )
    @5v vcc each adc count is 4.88 mV
    4.88*256=1249
    pbp divides/multiplies have internal 32 bit results there are various commands the allow convenient
    access to this result in useful ways

    @40 deg tc would be about 184 counts


    so our calc is (184*4.88*256)/256
    since pbp can't do real numbers

    we do the 4.88*256 =1249

    and 184*/1249 does the rest ie 184*1249/256
    Warning I'm not a teacher

Similar Threads

  1. 16f886
    By Larry in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 4th November 2008, 17:57
  2. 16f886
    By hvacrtech in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 27th May 2008, 06:06
  3. Setting Address via ADC
    By breesy in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 14th October 2007, 15:33
  4. Setting up ADC....
    By robertmark68 in forum General
    Replies: 1
    Last Post: - 11th August 2006, 19:08
  5. Setting Up Adc Ports
    By GEEZER in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 22nd August 2005, 04:04

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