[PIC] frequency counter with 4x7 segment LED display

Status
Not open for further replies.

Kerryannewood

Newbie level 2
Joined
Jul 14, 2015
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
12
Hi guys,

I'm new to this, but I need help writing a code (MPLAB in C) for a frequency counter with a 4x 7 segment display using a PIC18f252, and a 74HC4511 driving the display.

it needs to work in the range 15hz to 200hz.

Thanks so much if any one can help
 

Hi,

what frequency resolution do you want for your frequency counter?

in other words:
You have a 4 digit display. but "15" needs only two digits and "200" needs only 3 digits. Do you want it to show "0200" Hz or "200.0" Hz?

****
Technically you need a signal gating with exact timing. 1.000 seconds for example.
As long as the gating is active count the incoming pulses. When the gating is inactive display the counter value and reset the counter to zero. Activate the gating a new.

Klaus
 

hi Klaus,

The resolution needs to be '0015 or 0200'.

My main issue is lack of understanding in creating code, i'm very much a beginner in this.
 

Hi,

if you need code, then try to google "PIC18 frequency counter code".

Most probalbly you have to adjust the code for your hardware, but this should not be the problem.

Maybe you have to merge it with code for the 7 segment display.
****
But the task is simple: wait for exactley 1 second. count incoming pulses. if your counter stops with a value of 45 then it means 45 Hz.
Now form your counter value to get BCD values.
With the help of a table you could form BCD to 7segment.

Klaus
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…