Math Problem


Closed Thread
Results 1 to 2 of 2

Thread: Math Problem

  1. #1
    Join Date
    Sep 2005
    Location
    California USA
    Posts
    7

    Default Math Problem

    Hello group,
    Well I have a math problem I'm trying to figure out is decimal math.
    I have an input that is .011 per input, now I am trying to figure out how to multiply that by that decimal value and display it with LCDout command.
    I have tried several things but it just does not work.
    I guess I am just a dummy when it comes to math in PBP3.
    I am just lost right now. Any help would be just great.
    Thank you
    Willie

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,520


    Did you find this post helpful? Yes | No

    Default Re: Math Problem

    Hi,
    You mean you're sampling a signal with the ADC and each "count" in the returned ADC resulut equals a real value of 0.011? Ie, if the ADC returns 455 you want your LCD to display 5.005?

    You could start by multiplying the ADC result by 11. That would, with the above example, give you the value 5005. From there it's as simple as
    Code:
    LCDOUT $FE, 1, "Value: ", #Result/1000, ".", DEC3 Result//1000
    That's one way....

    /Henrik.

Similar Threads

  1. Math Problem
    By erice1984 in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 23rd April 2009, 03:45
  2. Math problem
    By Kamikaze47 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 16th February 2008, 10:53
  3. Math problem
    By selbstdual in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 18th February 2007, 21:27
  4. math problem?
    By serdar_ozcan in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 14th January 2005, 16:31
  5. Math problem!
    By in forum General
    Replies: 8
    Last Post: - 8th September 2003, 09:32

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