Skip to content

Instantly share code, notes, and snippets.

View Alfredosavi's full-sized avatar

Alfredo Savi Alfredosavi

View GitHub Profile
#define pwmOut (1 << PD3) // Porta 3
void setDuty_pin03(float valueD); // Seleciona o %DC na saída digital 3
void setFreq(char option); // Seleciona a frequência de operação do PWM
char duc = 0; // Duty cycle 0 a 100%
ISR(TIMER0_COMPA_vect) { // Vetor para interrupção por overflow do Timer0
duc++;