Help with A/D math!


Closed Thread
Results 1 to 16 of 16

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,161


    Did you find this post helpful? Yes | No

    Default Re: Help with A/D math!

    Nice you got it working. Also very nice graphics in your pdf file!

    Ioannis

  2. #2
    Join Date
    Mar 2011
    Location
    Bangkok Thailand
    Posts
    16


    Did you find this post helpful? Yes | No

    Thumbs up Re: Help with A/D math!

    Thank's Ioannis. There is a long way to go. But i start to understand what every body is talking about, Loook in the datasheet, 70% of the answer is there.

    Continue the good work, I will try.

    Ole

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,161


    Did you find this post helpful? Yes | No

    Default Re: Help with A/D math!

    I see that you have the potential. From your first question to your complete working code there was an impressive progress.

    By he way what you used for the graphics?

    Ioannis

  4. #4
    Join Date
    Mar 2011
    Location
    Bangkok Thailand
    Posts
    16


    Did you find this post helpful? Yes | No

    Default Developer survival KIT

    Hey
    No no i have not write everything by myself, i take some examples here and there and i got help here at the forum. So i am not so smart as it looks.

    Actually i use a very old program, Freehand MX. Its still available at Adobes site. Why i use it? Because i have used it for 20 years and its in my fingertips. I made the symbol library myself, if you want it just let me know.

    My development kit always go with me.
    My MacBook Pro
    Proteus
    PicBasicPro
    MikroC pro for PIC
    PIC-kit 2
    Programmer
    Developer Board CP-Pic training, buyed in Bangkok for 60 euro. se picture.

    Great to have everything from Mac and PC in the same Computer.

    Ole
    Name:  pickit.jpg
Views: 753
Size:  84.7 KB
    http://www.etteam.com/product/01B10.html
    Last edited by thronborg; - 18th March 2011 at 00:59.

  5. #5
    Join Date
    Feb 2011
    Location
    Michigan, USA
    Posts
    33


    Did you find this post helpful? Yes | No

    Default Re: Help with A/D math!

    Hi Dave,
    I've used the DIV32 function alot for stuff like this. In your example I would do something
    like this.
    50" - 6" = 44"
    44" / 1024(10bit) = 0.042968
    convert this number to word constant in your program 42968
    multiply a/d result by 42968
    the very next line must be DIV32 statement (word var = DIV32 10000)
    then add your 6" offset (+ 600)

    example: (a/d result = 1023)
    1023 * 42968 = 43956264 '(32bit result you can't access but DIV32 can)
    res = DIV32 10000 '(res = 4395)
    res = res + 600 '(res = 4995 hundreth inches or 49.95 inches)

    Mike

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