+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2009
    Location
    Saint-Quentin-en-Yvelines, FRANCE
    Posts
    66

    Default Working with 64 bits variables

    Hello everybody,

    I am using a pressure sensor from MEAS, connected to a PIC 18F2685.
    This sensor delivers some calibraton data and some intermediate results on an I2C bus and the PIC needs to do some additional computation to get the pressure in mBar.
    A complex step is the temperature compensation which requires some computation with 64 bits signed long variables.

    I use the LONG options in PBP Pro which provides me with the capability to process 32 bits long variables but I cannot see any solution for 64 bits.
    I can try to cut my 64 bits variables in 32 bits intermediate variables, make some shifts, BYTES movements etc... but it will be a very hard and tricky way.

    Does anybody have a good idea ?

    Thank you for your help

    MikeBZH

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

    Default Re: Working with 64 bits variables

    Check out Darrels N-BitMath wrappers around Alexander Avtanski assembly math routines.

    http://dt.picbasic.co.uk/CODEX/N-BitMath

    /Henrik.

  3. #3
    Join Date
    May 2009
    Location
    Saint-Quentin-en-Yvelines, FRANCE
    Posts
    66

    Default Re: Working with 64 bits variables

    Hi Henrik,

    Many thanks for your answer.
    It looks great !
    Once again Darrel had the solution....

    Michel

Similar Threads

  1. Testing Bits in variables..
    By retepsnikrep in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 6th June 2017, 14:09
  2. Replies: 2
    Last Post: - 12th November 2014, 08:57
  3. Replies: 2
    Last Post: - 23rd April 2013, 16:34
  4. DT_INTS-14 /interrupts enable bits / flag bits
    By bogdan in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 16th May 2009, 18:42
  5. Need clever way to convert 10 bits to 8 bits
    By MikeTamu in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 2nd September 2005, 15:13

Members who have read this thread : 16

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