weiß nich mehr... motor pwm stuff

This commit is contained in:
john stone 2012-07-24 19:51:15 +02:00
parent 6ac7134589
commit cb1e79ad2c

View File

@ -16,7 +16,7 @@ static inline void init_pwm(void)
TCCR1A = (1<<COM1B1) | (1<<WGM11); // only b-chan , fastpwm (mode 14) TCCR1A = (1<<COM1B1) | (1<<WGM11); // only b-chan , fastpwm (mode 14)
TCCR1B = (1<<WGM13)|(1<<WGM12) | (1<<CS10); //Fastpwm, no prescale TCCR1B = (1<<WGM13)|(1<<WGM12) | (1<<CS10); //Fastpwm, no prescale
return return ;
} }
static void init_leds(void) static void init_leds(void)
@ -45,11 +45,9 @@ static void init_motor(void)
static void stupid_pwmtest(void) static void stupid_pwmtest(void)
{ {
for (;;) { for (;;) {
OCR1BH = 0; OCR1B = 0xc3d2;
OCR1BL = 0;
_delay_ms(1); _delay_ms(1);
OCR1BH = 0xff; OCR1B = 0xeff;
OCR1BL = 0xff;
_delay_ms(1); _delay_ms(1);
} }
return; //never return; //never