Professional Documents
Culture Documents
Manuscript received August 15, 2008. This work was supported in part by
the Ministry of Science and Technology, Union of Myanmar.
Wai Phyo Aung is with the Mandalay Technological University, Mandalay,
Myanmar (phone: 095-2-88704(Electronic Engineering Department), fax:
095-2-88702 (Office,MTU), e-mail: aungwp@gmail.com).
348
The HF input is fed into the PIC at pin 2 and pin 3 (RA3
and RA 4) by passing through the 470 resistor and this input
signal is amplified by a BC 547 Transistor, an inductor, etc.
The supply voltage for two circuits: PIC and 4051 Decoder
are +5 V DC. The incoming signal is measured by PIC
16F84A with the help of software. Three PORTA pins, RA0
to RA2 are connected to 4051 Decoder and these 3-bytes
outputs are multiplexed in this Decoder. The seven output pins
of the 4051 Decoder are fed into seven number of Common
Cathode 7 segments LED display at common pin. The main
process of 4051 Decoder is that to convert the incoming 3bytes from PIC to Digit Numbers. The anode pins of 7 x
Common Cathode 7 segment LED display are connected with
the PORTB pins (RB7:RB0) of PIC microcontroller. The
cathode pins are grounded and connected to 4051 Decoder
passing through 7 x NPN Si-Transistors.
The power supply circuit is built to convert the AC 220 V
to the required +5 V DC, the actual requirement is between
+2.5 and +5 V DC. The Transformer converts 220 V to 12 V
AC. This 12 V is changed to the required +5 V by using 7805
IC with the help of two capacitors.
III. OPERATION OF PIC 16F84A AS FREQUENCY COUNTER
In this application, the PIC 16F84A operated as a frequency
counter which can read frequencies from 10 Hz to 30 MHz. It
is used the method of measuring the 24-bits (3-bytes) counter
value from the prescaler, TMR0 (timer 0 module) and some
other registers, such as Option Register. The basic hardware
for the measurement circuit is depicted in Fig. 2. It consists of
the frequency input at TMR0 or TOCKI (pin3 in a PIC
16F84A). This pin is connected to RA3 and the input
frequency is connected to TOCKI through a 470 resistor.
TMR0 is configured to measured the input frequency, at
RA4 of the PIC 16F84A. The input frequency is gated for a
precise duration of time. Before starting this precise gate,
TMR0 is cleared and the RA3 pin is configured as an input.
The precise gate is implemented in software as an accurate
delay. A 24-bit value of the input frequency is now saved in
TMR0, Registers and 8-bit prescaler. By concatenating the
calculated value and the original value from TMR0 (256-N),
the 24-bit value for the frequency is determined.
349
(a)
(b)
Fig. 4 The Measuring Flowchart of the overall Process
350
10 HZ = 00.00001,
10 KHZ = 00.01000,
18 MHZ = 18.00000
ACKNOWLEDGMENT
Firstly the author would like to thank his parents: U Hla
Win and Daw Saw Shwe from Mawlamyine, Myanmar for
their best wishes to join the PhD research. His Excellency
Minister U Thaung, Ministry of Science and Technology will
also get the authors great thanks for his special guidance to
pay chances. Special thanks are due to WASET for giving
chance for this paper. As this research paper is the authors
M.E research, he would like to thanks all the persons guided
in that time. The author greatly expresses his thanks to all
persons whom will concern to support in preparing this paper.
Fig. 5 Testing result of LED segments Activation
REFERENCES
[1]
[2]
VIII. CONCLUSION
This research project develops the Frequency Counter using
the advanced microcontroller PIC technology. It includes the
hardware design and software implementations. Firstly, the
theory and architecture of PIC microcontrollers are studied.
Then, apply these techniques to design and construct the
frequency counter. Also, the various operations of frequency
measuring instruments of analog and digital types are studied.
With all the backgrounds of PIC microcontroller, 4051
decoder, seven segment LED display and other electronics
351