pulse program for pic16f873

Thread Starter

haran

Joined Apr 6, 2008
42
can u guys help me to crate a pulse program for pic16f873? i need the pic 2 send out a pulse in the frequency of 40khz:confused:
 

CVMichael

Joined Aug 3, 2007
419
I think what you need is to setup an interrupt, that turns one of the pins on and off, at your required frequency.

I just found out how to use interrupts myself :)

Here is the link:
http://forum.allaboutcircuits.com/showthread.php?t=12179
in the last post you will see code for the interrupt

To calculate the values that you need for your frequency use this formula:
pic_clock_MHz / 8 / prescaler / (256-Timer_initial_value) = your frequency

Read pages 6 & 7 from the PDF link I posted for a better explanation on how to calculate the values
 
Top