Skip to content

100% Duty cycle is not completely 100% (see picture) #48

@sylvanoMTL

Description

@sylvanoMTL

here are part of the code I am using:

#define FAN_PWM_PIN 9 //9 or 10 for UNO
#define DEFAULT_DUTY_CYCLE 20
float dutyCycle = DEFAULT_DUTY_CYCLE;
void setup(){
  Timer1.initialize(40);  // 40 us = 25 kHz
}

void loop()
{
    Timer1.pwm(FAN_PWM_PIN, (dutyCycle / 100) * 1023);
}

here is a picture of the PWM :

So far I have no idea why it is causing this issue. (not I can dela with that) 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions