Git Product home page Git Product logo

Comments (2)

besp9510 avatar besp9510 commented on May 18, 2024

Hi tahanjokunimi,

Thanks for checking out dma_pwm and leaving a question.

The behavior that you describe in the first bullet point indicates an incorrectly set pulse width. I'm guessing that you did not update the config_pwm(int pages, float pulse_width) function call (found at the beginning of the test script) when changing the frequency to 100 Hz.

The test script sets pulse width to LED_PULSE_WIDTH. This maps to 10e3 us (or 10 ms) and is suitable for the frequency range 0.05 Hz - 10 Hz. If you would like to set a frequency outside this range, you can either calculate a pulse width or use one of the following presets:

  1. DEFAULT_PULSE_WIDTH : 100 Hz - 20 kHz
  2. SERVO_PULSE_WIDTH : 50 Hz - 10 kHz
  3. MOTOR_PULSE_WIDTH : 5 kHz - 1 Mhz
  4. LED_PULSE_WIDTH : 0.05 Hz - 10 Hz

See raspberry_pi_dma_pwm.pdf page 5 & 6 and "dma_pwm_pulse_width_calculator.xlsx" for a discussion on how to calculate this for yourself.

The behavior described in the second bullet point is something I'm going to look into further so let me get back to you on that.

from dma_pwm.

besp9510 avatar besp9510 commented on May 18, 2024

Hi tahanjokunimi,

I have just pushed a fix for the frequency issue that you discovered. Thank you for bringing it to my attention!

from dma_pwm.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.