Where can I find a draft of C code to measure frequency using PIC16F84?

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 3K views
prescott2006
Messages
24
Reaction score
0
i want to use measure the frequency of the square wave input at RA4/T0CKI of PIC16F84. so how should i start writing the code? anyone can provide some draft of the c code? thanks.
 
Engineering news on Phys.org
prescott2006 said:
i want to use measure the frequency of the square wave input at RA4/T0CKI of PIC16F84. so how should i start writing the code? anyone can provide some draft of the c code? thanks.

You should be writing your own code -- that's how you learn. What timer/counter resources does that PIC have to offer? What frequency range does your input square wave have?
 
When I started in PICs I had never wrote a line of C and had never done any programming of any microcontroller at all. I handled it just fine without anything except the datasheet for the microcontroller and a book (very basic) on C. I'm sure you can do it.