Shop Learn
PWM frequency limitations using simpletools.h with propeller 1 — Parallax Forums

PWM frequency limitations using simpletools.h with propeller 1

Using Simpletools.h in a propeller 1 C_program I am limited to a frequency of 11,765KHz. if I try to go higher in frequency by reducing the pwm_start "period" the output of each pin falls to zero.
Can someone tell what I did wrong?

Comments

  • iseriesiseries Posts: 1,008

    The short answer is that the code can not keep up with the frequency.

    If you switch the memory model from CMM to LMM you can get the frequency down to 20 with a 50% duty cycle(10). CMM uses sudo code instead of native code and therefore runs slower but uses less memory.

    Not sure why you need the pulses that short if your driving a motor.

    Mike

  • MicksterMickster Posts: 1,893
    edited 2021-08-24 07:52

    Audible noise. I run my PWM @19.531KHz using PropBasic and I still get 12 or 13 bits of resolution.

    Edit: Oops, I thought the OP stated Hz not KHz

Sign In or Register to comment.