dcdc1
dcdc1
h>
#include <delay.h>
#define IN1 0
#define IN2 1
#define IN3 2
#define IN4 3
/* Timer_PWM Function */
void PWM_Start(void);
void Stop(void);
void main(void)
// IO init
while ((PINB & (1 << 0)) == 0); // Wait for button release
while ((PINB & (1 << 1)) == 0); // Wait for button release
while ((PINB & (1 << 2)) == 0); // Wait for button release
while ((PINB & (1 << 3)) == 0); // Wait for button release
while ((PINB & (1 << 4)) == 0); // Wait for button release
TCNT1H=0x00;
TCNT1L=0x00;
OCR1AH=0x00;
OCR1AL=0x00;
OCR1BH=0x00;
OCR1BL=0x00;
void PWM_Start(void)
OCR1A = duty;
PWM_Start();
OCR1B = duty;
OCR1A = 0;
PWM_Start();
OCR1A = duty;
OCR1B = 0;
PWM_Start();
}
void Stop(void)