//sinusoidal PWM using ADC(16-bit PWM to be used) #define F_CPU 16000000//16Mhz #define MS_DELAY 1000 #include #include int main(void) { DDRB = 0xFF;//Port B set as output //DDRL = 0xff;//port L direction: output //pins- 49:42 //DDRC = 0xff;//port C direction: output //pins- 37:30 ADCSRA = 0x87;// ADC enabled and prescaler=128 ADMUX = 0x40;// Ref= Vcc// data is right-justified //ADC0 is source pin while(1) { //ADIF=0 ifu wanna reset, otherwise you keep it as 1 so that conversion doesnt start again //ADCSRA |= (1<