some help with math


Closed Thread
Results 1 to 40 of 65

Hybrid View

  1. #1
    Join Date
    Feb 2012
    Location
    PERTH AUSTRALIA
    Posts
    838


    Did you find this post helpful? Yes | No

    Default Re: some help with math

    Event1_OT_Hour=Event1_OT_Hour min 23
    yes have a done this - saved some space there - thanks

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,653


    Did you find this post helpful? Yes | No

    Default Re: some help with math

    can i store the data as a word and then get it back as a byte or if needed a word if so how
    http://www.picbasic.co.uk/forum/showthread.php?t=19949

  3. #3
    Join Date
    Feb 2012
    Location
    PERTH AUSTRALIA
    Posts
    838


    Did you find this post helpful? Yes | No

    Default Re: some help with math

    DT - ALL math done with these routines are done at the PRECISION level, and all variables used with the MATH functions must be (PRECISION) bytes in length.
    re reading the post make it clear

  4. #4
    Join Date
    Feb 2012
    Location
    PERTH AUSTRALIA
    Posts
    838


    Did you find this post helpful? Yes | No

    Default Re: some help with math

    looking at the Nmath caclualtions

    can a math action be done directly without copy a pbp var to a Pvar first ?

    A var byte

    Tmp32bit_1 var byte[PRECISION]
    Tmp32bit_2 var byte[PRECISION]
    Result var byte[PRECISION]

    eg - direct method
    @ MATH_ADD A, Tmp32bit_2, Result ; A+B =Res


    or do i always need to get the standard PBP var byte into a Pvar before the math calculation

    eg

    @ MOVE?BP A , Tmp32bit_1 ' copy byte PBP to Pvar
    @ MATH_ADD Tmp32bit_1, Tmp32bit_2, Result ; A+B =Res


    cheers

    sheldon

Similar Threads

  1. Help with A/D math!
    By dbodenheimer in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 19th March 2011, 00:51
  2. Math help please...
    By Ioannis in forum General
    Replies: 2
    Last Post: - 20th June 2008, 10:18
  3. PBPL Math...new math takes more cycles...Always?
    By skimask in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 10th February 2008, 10:22
  4. Math help please!!!
    By jbirnsch in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 10th August 2007, 14:45
  5. math help
    By houa in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 30th January 2006, 16: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