division problem 500000 / 133


Results 1 to 6 of 6

Threaded View

  1. #6
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default Re: division problem 500000 / 133

    Dummy = 500*1000 ' Produce intermediate result of 500000
    Result = DIV32 133

    lcdout $FE,2, "Duty:", dec Result

    ... still getting 65535 as output

    Thats all I have in the program, no interrupt nothing else !

    then I initialized my parameters this way:
    a var word
    b var word
    a= 500
    b = 1000
    Dummy VAR word
    Result VAR WORD
    Divider con 145

    Dummy = a * b ' Produce intermediate result of 500000
    Result = DIV32 133

    and its now working.. Dummy doesnt like numbers
    Last edited by lerameur; - 25th May 2013 at 16:36.

Similar Threads

  1. // Division Operator
    By Dick Ivers in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 9th September 2011, 15:27
  2. What is wrong with this division?
    By tjkelly in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 5th March 2010, 18:34
  3. Division by 0
    By sirvo in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 4th August 2007, 02:11
  4. Division with some decimal
    By Darklakebridge7 in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 10th May 2007, 07:41
  5. division
    By eoasap in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 28th March 2006, 17:26

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