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

AI Thread Summary
To measure the frequency of a square wave input at RA4/T0CKI on the PIC16F84, it's essential to understand the timer and counter resources available on the microcontroller. The discussion emphasizes the importance of writing your own code for learning purposes, rather than relying solely on drafts from others. Users are encouraged to consult the PIC16F84 datasheet and basic C programming resources to develop their code. Additionally, knowing the frequency range of the input signal is crucial for effective implementation. Engaging with these resources will facilitate a better understanding of microcontroller programming.
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.
 
Very basic question. Consider a 3-terminal device with terminals say A,B,C. Kirchhoff Current Law (KCL) and Kirchhoff Voltage Law (KVL) establish two relationships between the 3 currents entering the terminals and the 3 terminal's voltage pairs respectively. So we have 2 equations in 6 unknowns. To proceed further we need two more (independent) equations in order to solve the circuit the 3-terminal device is connected to (basically one treats such a device as an unbalanced two-port...
suppose you have two capacitors with a 0.1 Farad value and 12 VDC rating. label these as A and B. label the terminals of each as 1 and 2. you also have a voltmeter with a 40 volt linear range for DC. you also have a 9 volt DC power supply fed by mains. you charge each capacitor to 9 volts with terminal 1 being - (negative) and terminal 2 being + (positive). you connect the voltmeter to terminal A2 and to terminal B1. does it read any voltage? can - of one capacitor discharge + of the...
Hello dear reader, a brief introduction: Some 4 years ago someone started developing health related issues, apparently due to exposure to RF & ELF related frequencies and/or fields (Magnetic). This is currently becoming known as EHS. (Electromagnetic hypersensitivity is a claimed sensitivity to electromagnetic fields, to which adverse symptoms are attributed.) She experiences a deep burning sensation throughout her entire body, leaving her in pain and exhausted after a pulse has occurred...
Back
Top