[PIC] PIC16F84 functioning as a frequency counter

Status
Not open for further replies.

michaelopara

Newbie level 4
Joined
Dec 9, 2014
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
32
Hi guys I'm new here, from what i can see (the forums) you guys are doing great job helping other people.
Please guys, I've been surfing the net for quite sometime to get a clue about PIC16F84 assembly language which will function as a frequency counter.

1. The program should count the number of times an output line goes from '0' to '1' during a fixed interval
2. The transition should be limited to 255.
3. The interval over which the frequency should be counted is 589 assuming the clock frequency is 4MHz.

I was asked to make a flow chart on this and list some hardware components explaining how to connect the components of the system together.
Please guys help, no bashing please as I rely on you guys to help me, nice hints will also do.
Thanks

- - - Updated - - -

Hello guys, Please i don't need code for now, what i need now are explanations on how to make a flow chart, list of components and how to connect them. Thanks
 

hi,
You could use a 3.2768Mhz crystal for the 16F84, this gives an easy division by 2's down to 1 second
Timer0 using the external signal as an input can be set to give 255 counts before roll over and generate an Interrupt, or Timer1 can be used with an external clock.
Show us your attempt at the flow chart.
E
 

Ok, thanks for your response, i'll upload my attempt of the flow chart. but what are the hardware components? I asked my lecturer and he asked if I'm gonna use a 'Timer0' or not and if I'm gonna use an 'Interrupt or not, he didn't really specify but he said its not the resistors and capacitors.
My question is what are the hardware components, if you can list them i can go search for them and write a report on each of them.
 

hi,
By 'processing the counted pulses', does this mean amplifying/converting or attenuating the frequency pulses to be compatible with the required 16F84 input High/Low logic levels.?

I am not sure what you mean by 'read input switches', the 16F84 internal Timers are programmed to count the external frequency pulses for say 1 second. After 1second the counter contains the count equivalent to the frequency being measured.
On commercial frequency counters a capture period of 0.1Sec or 10Sec can be selected.

The 'addition/subtraction of IF' diagram block is redundant.

As you say the frequency count in the timer counter is in Binary and it has to be converted to ASCII decimal in order to display the frequency on an LCD.

E
 

Ok thanks for your effort, Please how do you think the flow chat should look like?
Example: START >>>>>> .......... >>>>> ........... >>>>>> etc.
please state them so i can draw it on Visio,
Secondly, He said the frequency should then be displayed as a hexadecimal digit on a standard 7 segment display.

What testing strategy can i Use?
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…