Frequency counter-- old project revisit


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: Frequency counter-- old project revisit

    Your code looks to be Proton, this forum is M E Labs P basic Pro.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  2. #2
    Join Date
    Oct 2014
    Posts
    3


    Did you find this post helpful? Yes | No

    Default Re: Frequency counter-- old project revisit

    Archangel
    Yes.. But let's put that aside for a moment

    If I look at this thread here: http://www.picbasic.co.uk/forum/showthread.php?t=1137

    There are three port pins that I'm using in this circuit: http://paulfjujo.free.fr/FREQ/images/weedfreq.jpg, would it then mean I would have to declare 3 pins for use of which portA4 is the input?

    Best
    Vivena

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: Frequency counter-- old project revisit

    Hi, I have tried both of your examples or links.

    The first one you only need to input the frequency on the T1CLK pin. Basically you clear timer 1, start tmr1
    then pause for 10ms, 100ms or 1s then stop timer1. Read the contents of TMR1L and TMR1H which is your frequency. This method is not very accurate using a pause statement for your time base.

    The second, this circuit was designed and sold as a kit by Terry Weeder many years ago. It used the RTCC with a elaborate scheme to gate the input pin on and off then pulsed the rtcc 256 time to purge the result or remainder. This was a very stable and accurate. This used three pins, freq in, gate and purge


    http://www.piclist.com/techref/piclist/weedfreq.htm

    So to answer your question the code in your first post will not work with the Weeder schematic. There is no timer1 in a pic1684. I started porting the assembly code to PBP at one time, but never finished. Look for the hex file for the pic16f84 and just program a new chip.
    Last edited by mark_s; - 28th October 2014 at 16:26.

  4. #4
    Join Date
    Oct 2014
    Posts
    3


    Did you find this post helpful? Yes | No

    Default Re: Frequency counter-- old project revisit

    Hello MarK_S
    Thank you for the simple explanation. I see the goof-up, I forgot to see the pins involved and assumed that the 16F628 would be good as the other, no wonder I went round in circles.
    Thanks for setting me in the correct direction, I will try and read the 16F84A details and see what I can achieve..

    I was trying to use Ero's code for a 16F628 unwittingly for a circuit that had a 16F84... whoops..

    Thanks once again..

    Vivena

  5. #5
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: Frequency counter-- old project revisit

    The real issue in using a 628/628A in place of 16F84 is that the 628 has comparator inputs which have to be disabled, otherwise very similar chips, if you have a hex file then go buy a 16f84 and call it good.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

Similar Threads

  1. Frequency counter
    By Macgman2000 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 4th February 2012, 15:33
  2. Audio Frequency Counter
    By mister_e in forum Code Examples
    Replies: 8
    Last Post: - 29th July 2009, 09:25
  3. frequency counter help and pointers
    By comwarrior in forum General
    Replies: 2
    Last Post: - 30th June 2009, 12:51
  4. Frequency Counter
    By Asmith in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 22nd June 2007, 16:54
  5. Low-Frequency Counter
    By Zeke in forum General
    Replies: 7
    Last Post: - 19th January 2006, 19:06

Members who have read this thread : 0

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts