jruibarroso
Joined: 07 Jan 2006 Posts: 64 Location: Braga
|
PWM problem |
Posted: Wed Nov 15, 2006 9:34 am |
|
|
if i use this , works fine :
int_count=INTS_PER_SECOND;
set_timer0(0);
setup_ccp1(CCP_PWM);
setup_counters( RTCC_INTERNAL, RTCC_DIV_256 | RTCC_8_BIT);
setup_adc_ports(AN0_AN1_AN3);
setup_adc(ADC_CLOCK_INTERNAL);
enable_interrupts(INT_RTCC);
enable_interrupts(GLOBAL);
setup_timer_2(T2_DIV_BY_1,54,1);
set_pwm1_duty(110L);
if i use this , nothing happens on CCP1
set_pwm1_duty(110);
what is the mean of this "L" , i need to put a variable to replace fixed duty
and don't know what to do with this "L"
ex : set_pwm1_duty(duty); // this don't work |
|