pulse counter


+ Reply to Thread
Results 1 to 7 of 7

Thread: pulse counter

  1. #1
    Join Date
    May 2012
    Posts
    20

    Wink pulse counter

    hi,i use pic16f628a.i used the code below.connected the circuit like the image.i used pin 12 for input.but lcd shows nothing.
    can sometell me what is the problem.
    thx.
    Attached Images Attached Images  
    Attached Files Attached Files

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


    Did you find this post helpful? Yes | No

    Default Re: pulse counter

    CMCON = 7 'turn off analog comparators which kill digital on port A
    TRISA =%00000000 'all porta as outputs
    TrisB.4=0
    TrisB.5=0 ' make portb4:5 outputs
    Last edited by Archangel; - 6th May 2012 at 08:45.
    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.

  3. #3
    Join Date
    May 2012
    Posts
    20


    Did you find this post helpful? Yes | No

    Default Re: pulse counter

    thank you archangel.
    i will test it and let you know the result.

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default Re: pulse counter

    In addition to Archangel. From what I know of Isis/Proteus whatever it is called) you
    - don't need to add a voltage regulator but some power terminal and assign them to Vdd.
    - unless you modify the config fuses, you'll need to tie MCLR to Vdd,
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default Re: pulse counter

    pretty much it

  6. #6
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Default Re: pulse counter

    Hi Daydream,
    I am not sure if your drawing is complete (showing all components) or just simplified and if it is complete then you are missing the filter / anti-oscilation capacitors at the output of the 7805. Typically, at least a 1 uf tantilum capacitor is necessary and it does not hurt to add a .1 uf and then some larger value (greater than 10 uf). If it helps, usually pin 4 (MCLR) is tied to +5v thru a 10k resistor as Mister_e pointed out. Best, Ed

  7. #7
    Join Date
    May 2012
    Posts
    20


    Did you find this post helpful? Yes | No

    Wink Re: pulse counter

    hi,i added the capacitors and the 10 kohm resistor and lcd shows the frequecy.
    so thank you all for your help.
    could someone change the main loop so that lcd shows freq and Period on the first and second line.
    thx.

Posting Permissions

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