Conversion to degrees help


Closed Thread
Results 1 to 19 of 19

Hybrid View

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


    Did you find this post helpful? Yes | No

    Talking

    Hi,

    The answer is quite simple :

    360° + 3 decimals = 360 000 steps ... 19 bits !

    360° + 2 decimals = 36000 steps ... 16 bits

    How do you do that with a 10 or 12 bits ADC ???

    try to look at 16 to 20 bits ADCs.


    Now, JUST for calculations ...

    3 decimals ... need at least PBPL and a Pic 18 ... Why not.


    The final smile ... what about your position sensor precision and linearity ???

    Alain

    2 decimals Ok
    ************************************************** ***********************
    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 " !!!
    *****************************************

  2. #2


    Did you find this post helpful? Yes | No

    Default

    Thank you for your fast reply

    yes you are right, So 360 / 4096 = 0.087 deg

    The linearity is ok as it is an absolute magnetic encoder

    I would like to display the result on an LCD in a xxx.xx format or xxx.xxx
    even if it does not reach its final resolution and the last digits are not correct or rounded

    Any help welcome

    Walter

  3. #3
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  4. #4


    Did you find this post helpful? Yes | No

    Default

    thank you joe, but value's are getting to big to fit in a 16bit var

    I thnk I need help from the Mathematics guy's

  5. #5
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by RFsolution View Post
    thank you joe, but value's are getting to big to fit in a 16bit var

    I thnk I need help from the Mathematics guy's
    That is most positively not me
    Last edited by Archangel; - 4th September 2008 at 22:54.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    but value's are getting to big to fit in a 16bit var
    Post a little code and an example of the values you are getting.
    And maybe think about upgrading to 2.5. The LONGS are cool.
    Dave
    Always wear safety glasses while programming.

  7. #7


    Did you find this post helpful? Yes | No

    Default

    Thanks Dave,

    Can you point me how to use the LONGS because when reading the PBP manual (online version and PDF @ melabs) they say 16bit is the maximum
    If i try to compile more than 16bit it give's me an error (i upgraded to 250.B and use MPASM)
    Are we talking about the same PICbasic ? I use Picbasic PRO from melabs



    Quote Originally Posted by mackrackit View Post
    Post a little code and an example of the values you are getting.
    And maybe think about upgrading to 2.5. The LONGS are cool.

Similar Threads

  1. A/D conversion with PIC18F67J50
    By ScaleRobotics in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 8th May 2009, 01:48
  2. A/D conversion problem in 18F2520, 2523, 2550 etc.
    By selimkara in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 10th March 2008, 16:26
  3. Conversion problem
    By eva in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 15th March 2007, 18:21
  4. Help for decimal conversion
    By eva in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 15th March 2007, 18:20
  5. 16bit variable and degrees conversion
    By RFsolution in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 2nd May 2005, 17:27

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