Incorrect calculations... please help.


Results 1 to 4 of 4

Threaded View

  1. #3
    Join Date
    May 2004
    Posts
    81


    Did you find this post helpful? Yes | No

    Default

    AH!, OK... Now I see it. Thanks....

    If anyone ever follows this thread or stumbles accross it, here was my solution:

    CalcMPG:
    MPG = Miles * 100 ' Add 2 decimal places to the miles Variable
    MPG = DIV32 GalUse ' perfome a divide on the 32bit result
    Return

    My output now looks like

    Level: 014.75
    MPG: 026.24
    Range: 387.04
    Miles: 032.80

    which is 100% what it should be. So now here comes the fun part... scaling this all into a 24 segment bargraph for LEVEL, MPG and RANGE...

    Thanks again Mith, Like I said some times it just takes a different set of eyeballs to see what someone else cant...
    Last edited by bearpawz; - 29th January 2007 at 20:01.

Similar Threads

  1. Incorrect adc channel bits generated
    By grahamg in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 6th February 2010, 18:56
  2. DS1307 returns incorrect data ???
    By gtvmarty in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 8th October 2009, 09:54
  3. clock/timer calculations
    By virolay in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 4th January 2008, 20:20
  4. Calculations for using faster Clocks.
    By Tissy in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 18th April 2005, 14:24
  5. timing calculations
    By scorpion in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 28th November 2004, 22:58

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