PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : wie sieht dieser pwm-wert aus in bascom



roboterheld
08.09.2007, 21:46
hallo, wie sieht der untere pwm-wert in bascom aus , bzw wie wir er hier reingesetzt (atemage32-8mhz):

Config Timer1 = Pwm , Pwm = 8 , Compare A Pwm = Clear Down , Compare B Pwm = Clear Down , Prescale = 256




// Initialize Timer1 - PWM:
// PWM, phase correct with ICR1 as top value.
TCCR1A = (0 << WGM10) | (1 << WGM11) | (1 << COM1A1) | (1 << COM1B1);
TCCR1B = (1 << WGM13) | (0 << WGM12) | (1 << CS10);
ICR1 = 210; // Phase corret PWM top value - 210 results in
// about 19 kHz PWM.
// ICR1 is the maximum (=100% duty cycle) PWM value!
// This means that the PWM resolution is a bit lower, but
// if the frequency is lower than 19 kHz you may hear very
// annoying high pitch noises from the motors!
// 19 kHz is a bit over the maximum frequency most people can
// hear!
//
// ATTENTION: Max PWM value is 210 and NOT 255 !!!

chill-flo
08.09.2007, 23:15
sorry aber ich versteh nicht wirklich was du wissen willst

roboterheld
15.09.2007, 21:23
ist gelöst das problem.