How to read frequency signal?

Status
Not open for further replies.

jsbhalla88

Member level 1
Joined
Mar 3, 2015
Messages
41
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
314
Hi,
I am working on PIC18F4520.
I have a signal on PIN RB2 whose frequency is 120Hz, pulse width 230 us(approx.) and time between falling edge and next rising edge is about 200 ms.
I have to read this signal and check whether it has the above specifications or not.
how to do this..?????
 

Hi,

you need a lab tool like an Oscilloscope.

Now days you can buy very good ones for very little money.
I have my eyes on one of Rigol for quite some time.
 

The common method is on rising edge to start a counter (timer in counter mode) and to stop the counter on falling edge. The count * period of the clock is the period of your pulse.
You can use PORTB interrupt to start and stop the counter.
 
Last edited:

Hi,

you need a lab tool like an Oscilloscope.

Now days you can buy very good ones for very little money.
I have my eyes on one of Rigol for quite some time.

I have one.. this is how I checked the pulse characteristics...
 

EDIT....:
next rising edge is 8 ms, not 200 ms...I mixed it with other signal...
 

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