Author Topic: Period meter using PIC18F452,...  (Read 3202 times)

0 Members and 1 Guest are viewing this topic.

Offline bobxTopic starter

  • Newbie
  • Posts: 1
Period meter using PIC18F452,...
« on: May 02, 2012, 07:14:41 pm »
Hello,everybody.I want to measure the period of an input signal at the range of 10 usec  to 1 sec
,using; PIC18F452 or PIC18F8722,XTAL=40MHZ and with mikroC PRO for PIC V5.30 compiler&
T6963C GLCD.

I wrote some codes and tested them with Proteus but all of those display wrong.

Would you please help me for that and give me a code example for that?

                                                       Thanks,
 

Offline GrumpyDave

  • Contributor
  • Posts: 24
Re: Period meter using PIC18F452,...
« Reply #1 on: May 03, 2012, 10:15:54 am »
Hi, welcome to the forum!

You havent really given much information on what problems you are having..

You could use the CCP peripheral to measure period of some square pulses.

The Microchip CCP tips pdf may be helpfull.
http://ww1.microchip.com/downloads/en/DeviceDoc/41214a.pdf

Without more info from you about your project its difficult to help.
 

Offline MikeK

  • Super Contributor
  • ***
  • Posts: 1314
  • Country: us
Re: Period meter using PIC18F452,...
« Reply #2 on: May 03, 2012, 02:24:22 pm »
If it's an audio signal you can setup a simple zero-crossing detector with a couple resistors and diodes and feed that to an interrupt pin on the PIC.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf