A to D on the PIC16F687


Results 1 to 16 of 16

Threaded View

  1. #11
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Default

    Hehe ... good !!!

    Just think PbP works with integers ... so multiply the result by 5 and only after that, divide by 1024 !

    to enhance precision ... you could multiply by 50 ... and keep the 1/10 th !!!

    could also use the DIV 32 function :

    if your ref voltage was, say 4.955v ... instead of 5.000 ... you could multiply by the real ref voltage in millivolts and , as soon as, divide by 1024 ( see DIV32 chapter for that ) to get maximum precision ...
    a small comma shift will do the rest !!! ( see DIG function ... I remember threads about that on the Forum = a little search !!! )

    but remember pot linearity is not so good ( very linear pots exist ... special price too !!! ) ... so position or angle to voltage won't be very accurate !!!

    Alain
    Last edited by Acetronics2; - 3rd July 2006 at 16:43.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

Similar Threads

  1. LCD with PIC16F687
    By jblackann in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 27th June 2006, 00:16
  2. PIC16F687 - supported?
    By badcock in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 6th August 2005, 11:33

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