How to avoid DIV32 command?


Results 1 to 10 of 10

Threaded View

  1. #1

    Default How to avoid DIV32 command?

    Hi everyone,

    If you have followed my previous thread, you know that I've problems with the DIV32 command, because it apparently disturbs DT Instant Interrupts (if you're here Darrel, can you tell me if the DIV32 command has really an impact on your interrupts?).

    So there is my problem, I've to make the following calculations without DIV32 :

    var=1120000/freq
    reload=(65535-var)+8

    As you can see, "1120000" is too large for a 16-bit register. 24-bit will be good.
    "freq" variable range is between 10 and 1200.

    So how I can do this with a routine, or anything else?

    Thank you.
    Last edited by pxidr84; - 14th May 2011 at 18:38.

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