How to count pulses per second ?

It's on ABSE and I mailed you the stuff directly. Let me know if you need any help.

Reply to
Anthony Fremont
Loading thread data ...

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 ! MC

Reply to
Mike C

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.

Ed

Reply to
ehsjr

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.

formatting link
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.

Reply to
Anthony Fremont

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.