Datasheet
else
if (PINC.B1) { // Detect if PORTC pin 1 is pressed
Delay_ms(40); // Small delay to avoid deboucing effect
current_duty1--; // Decrement duty ratio
PWM1_Set_Duty(current_duty1); // Set decremented
duty ratio
}
} while(1); // Endless loop
}
HW Connection
PWM demonstration
381
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroC PRO for AVR
CHAPTER 6