How to avoid DIV32 command?


Closed Thread
Results 1 to 10 of 10

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default Re: How to avoid DIV32 command?

    Quote Originally Posted by pxidr84 View Post
    ..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?).
    DIV32 does not disturb DT_INTS, and DT_INTS does not disturb DIV32.

    However, DIV32 takes a while to execute, and even longer when you do a multiply before hand to load the registers with a big value.
    Trying to use them inside a high frequency interrupt is unlikely to work.

    Division with LONGs or N-Bit math is no better. Divisions take a long time in software.
    DT

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default Re: How to avoid DIV32 command?

    I would go for a Huge lookup table or loaded EEPROM: those only take few uSec to be processed.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: How to avoid DIV32 command?

    Quote Originally Posted by mister_e View Post
    I would go for a Huge lookup table or loaded EEPROM: those only take few uSec to be processed.
    I havent problems anymore, look at the end of "Unstable sine PWM output" thread.

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