Problem with Div32


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    I've highlighted the offending line in your last post.

    In order for DIV32 to work. Certain PBP system variables must be preloaded with the result of a WORD multiplication.

    If the multiplication happens at "Compile-Time", those variables don't have the correct value.

    When the WORD multiplication happens at "Run-Time", PBP's system variables still have the 32-bit result when it gets to the DIV32.
    <br>
    DT

  2. #2
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    Thats the line I though was problematic.
    This is why I added
    dummy =0
    I even tried dummy = 0000000000000000
    to remove any values in dummy, but it is not enough.
    I dont quite get your solution.

    k

  3. #3
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    a ok,
    I added
    constant var word
    constant = 126

    thanks

Similar Threads

  1. RPM - DIV32 Problem
    By davewanna in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 11th April 2008, 04:33
  2. USART Problem , but don't know where, in pc? or in PIC?
    By precision in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th July 2007, 08:12
  3. 32-bit Variables and DIV32, Hourmeter 99999.9
    By Darrel Taylor in forum Code Examples
    Replies: 9
    Last Post: - 23rd November 2006, 07:23
  4. 1 slave 1 master 1 MAX232 1 problem ?
    By SuB-ZeRo in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 31st July 2005, 22:59
  5. Retrieving Div32 Remainder
    By Darrel Taylor in forum Code Examples
    Replies: 4
    Last Post: - 20th August 2003, 03:53

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