asimraufawan
Joined: 04 Jul 2008 Posts: 12 Location: Karachi Pakistan
|
how to use timer2 |
Posted: Mon Nov 17, 2008 1:48 am |
|
|
hi everyone
I m using Timer2 with PWM for IR transmitter
the format we use is like.
Code: |
{
setup_timer_2(mode,period,postscale);
set_pwm2_duty(value);
} |
In MODE we use divide by 1 or 4 or 16 what difference does it make.
Now there are two things to select frequency & duty cycle
1.n IR we generally use 38KHZ & 50% duty cycle
2. it is necessary to put 50% duty cycle while transmitting.
What is post scale value range 0 to 16 , what happenes on every digit select.
THANKS. |
|