yes, i can do this with timer and interrupt but first of all i want to know how can i do this with pwm mode? i want to make pulses and at the same time my program should measure the battery voltage with ADC and etc.