Connect with us

How to count pulses per second ?

Discussion in 'Electronic Basics' started by Mike C, Feb 13, 2007.

Scroll to continue with content
  1. It's on ABSE and I mailed you the stuff directly. Let me know if you need
    any help.
  2. Mike C

    Mike C Guest

    Anthony :) Thanks alot for the pic code ! truly appreciated. pretty
    impressed that you wrote this directly in asm... i would really need
    to dig out some old college textbooks to refresh my asm memories... I
    was really hoping for some C code :) After I order a pic kit, i'll try
    burning the asm code and see what happens... but i'd need to re-write
    in C down-the-line anyway, since I'd want to expand on it without
    coding it all in asm..

    JF: Funny thing now, I ordered the HC4017.. and started putting
    pieces together, when I noticed that the "Divide by 10 counter" was
    dividing a pulse without anything on the input line ... looks like
    this chip is so sensitive that its picking up "AC Hum" on the input
    line... all by itself ... any suggestions on how to get rid of it ?

    Thanks alot !
  3. ehsjr

    ehsjr Guest

    Bypass the supply near the chip (.01 uf to ground
    from +Vdd) on general principles. Your input is
    the clock line - pin 14. You don't want to leave that
    floating. What are you driving it with? Tie the pin
    to ground through 10K to see if that makes a difference.

  4. Your welcome. :) The code is specific to a 12F683, so if you want to run
    it on another model it will need some changes. I highly suggest you stick
    with assembler, at least until your comfortable with it. C is nice, but
    there is nothing like assembler to teach you how it all really works. Good
    luck, and if you want a preprogrammed chip, just let me know. is a great resource for this stuff.
    If the input pin was floating, that's not very surprising. CMOS inputs are
    quite sensitive. Floating inputs seem to like to hover around the switching
    point, rapidly toggling back and forth. You'll probably be ok once it's
    connected, but use bypass caps (.1uF or .01uF) on the power pins of the chip
    anyway. If you still have problems picking up the stray AC you can try
    placing ferrite beads over the input line.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day