How to count pulses per second ?

--
Done.
Reply to
John Fields
Loading thread data ...

Greetings Mike, I think that if you follow this link:

formatting link
you will find your solution. The circuit seems to do exactly what you want. ERS

Reply to
Eric R Snow

--
No, it won\'t.  He wants to detect pulses with varying widths and
varying spacing.
Reply to
John Fields

In the time you've all been talking about this, he could have done it by now by buying a cheap PIC programmer, a couple of PICs, and visiting the piclist a few dozen times.

God knows how many times I've sat in a meeting and said "Do this," and

3-months later they've spent thousands, a few people have left, and they're all still arguing about it.

:-)

Reply to
Aly

LOL, but the funniest part is that it's true as long as he didn't have a run in with Olin. ;-)

......6 months after that and tens of thousands more wasted, the project manager is fired and the java crew are given their walking papers. You then do the project with a PIC in about a week. But no reward or even a pat on the back for you, uh uh. Even though you never mention it, they all know what snide little thoughts you're thinking.......so they reward you by hiring an H-1B to "help you out around the office". ;-)

Reply to
Anthony Fremont

Hi, Mike. If you're still there, you might want to consider using a

4518 (dual BCD counter) and a 556 (dual 555). If you've also got a couple of spare inverter gates, it's easy (view in fixed font or M$ Notepad):

VCC + .---------------. .-----------------. | | | | | '--oEN | | | | 1/2 4518 Q3o------oEN 1/2 4518 | | | | | o---oCLK | .--oCLK | | RST | | | Q0 RST | '-------o-------' === '--o-----o--------' | GND | | | | | VCC | | | + '---------o-------)-----'VCC | | | + .-. | | | | | O | .-. VCC | | .---------. / \\ | | | + '-' | | (___) | | | | | | | | | '-' .------------. o-----o | | | | | | | | 1/2 556 | | | |\\ | | | .-. | OUTo---' '--| >O-)--o 1/2 556 | | | .--o | |/ | | OUTo | | | | | | | | '-' | | | | | | | | | | | | | o--o--o | --- | | | | | --- | | --- '---------' | '------------' --- | | | === === === GND GND GND (created by AACircuit v1.28.6 beta 04/19/05

formatting link

The 4518 is set up to count the positive transitions of the input (if you want to count NGTs, connect the input to EN and make CLK=0). If the 10s bit goes high before the once a second reset pulse of the first half of the 556, it triggers the second half of the 556. Make the monostable output pulse as long as you want to turn on an LED or something else.

Here are the datasheets:

formatting link
formatting link

Good luck with your homework.

Cheers Chris

Reply to
Chris

No. He (the OP) said it would be a big learning curve.

PIC's are great, but how is it that the "PIC crowd" always comes in with the same mantra "he could have done it with a PIC in a few hours" or similar, yet we never see a PIC solution offered by them?

Take a look at the huge number of helpful answers on this newsgroup and others from John Fields. He posts complete, solid solutions with schematics & identified parts values. He doesn't just say, "you could do that with an electronic circuit" and walk away.

If the "PIC crowd" wants to promote PIC solutions, show them.

In the time *you've* been following the thread, John has already designed and posted a hardware solution. You haven't - no one from the PIC crowd has. If it's so damn easy that a "PIC newbie" like the OP can do it with a few hours work, then one has to wonder why experienced PICers can't/don't/won't come up with something. Lord knows there's plenty of opportunities. Fields has proven that by posting solutions over and over and over again countless times to a wide variety of questions. The "PIC crowd" has made comments. As to providing solutions, they are dead silent. You guys want to take what you see as tantamount to "the moral high ground" with your "use a PIC" chant, then arrogantly walk away, offering nothing. When you start providing practical solutions your words will take on weight. Otherwise, they are smokescreen that may look good, but is without substance.

Ed

Reply to
ehsjr

Could it be that the OP never wants to see one? The circuit for this using a PIC is a joke, the code is the real work effort. If the OP doesn't want to use a PIC, why should someone write code?

I'm sorry, I can't seem to find your solution here.

Several in fact, most don't work or meet the OP requirements, but I guess that doesn't matter because it didn't involve a PIC.

Too bad that he's such an offensive person. If he wasn't in everyone's killfile, more people might appreciate his efforts.

Yet another PIC hater speaks. Same old mantra: learning curve, PIC crowd, no help, rah rah rah. And where is your schematic showing how to do it the Rube Goldberg way? I've posted PIC code here before, have you? IOW, until you offer up more than rhetoric, you're no better than "us". When have you seen a poster ask for the code and a "PIC lover" just blew them off?

Reply to
Anthony Fremont

--
Exactly.  And if the OP doesn\'t want to use a PIC why should he be
berated for that?
Reply to
John Fields

--
But that\'s not what _he_ wants to do.
Reply to
John Fields

--
I don\'t think that\'ll work because the 555 isn\'t retriggerable.
Reply to
John Fields

Show me a post where I berated someone asking for help.

Show me a post where I "tell people to do it my way". Your absolutely juvenile and a liar.

I certainly have, plenty of times. Don't you believe me?

That's only because you jumped before you looked, as usual. Or don't you remember that, "current/power hog"? You struck the first, second, .... and tenth blows before you even bothered to do a Google search. You had to come back with your tail between your legs and fess up. Why do you do this to yourself John?

You get killfiled more in one week than I have in a lifetime. I think you should look at it like this, "the ones that plonked you, have no use for YOU". I've gotten plenty too, should we compete on that too?

Continually adding parts just to make the point that a PIC isn't necessary is a silly exercise. Two pots? Come on, a micro has far more accuracy using the internal osc (1%) without adjustment. Times change, even if you don't want to.

Look who's being retaliatory.

My code will be posted later, now that someone actully wants to see some.

I've given away plenty of code, you just don't know where to look for it. I'd be willing to wager money that you couldn't duplicate the functionality with discretes either. Now go ahead and shoot your mouth off some more without knowing what will be actually required of you.

Convince everyone? Get real. The PIC haters are the PIC haters period, there is no "convincing".

That's the difference between you and I. I think before I write, therefore it likely won't take "several" cycles to debug. This is one of those things that will likely work the first time out.

You're the one that couldn't even interpret the OP's requirements without asking more questions, even though they were fairly clearly stated. Once you knew what they actually were, you couldn't wait to shout down someone elses reintroduction to your idea of a missing pulse detector. It's all about being first isn't it John, never about getting it right the first time?

How is your hardware design going to help me? Outside of the LED and resistor, there will be no common parts. You don't even think things thru, you just keep ratcheting your jaws.

Changing the subject doesn't constitute a rebuttal of my statement. Show us an example of what you claimed or please shut up.

Reply to
Anthony Fremont

And I thought he said this about using a PIC. "Thanks for your help. I actually considered that option, but I was under the impression that a simpler circuit could do this job." Of course you then proceeded to show him that a "simpler circuit" would not do the job.

Reply to
Anthony Fremont

Who, exactly, is doing the ramming here Fields? You PIC haters are all alike, just the mention of the word and you guys are frothing at the mouth like rabid dogs. Making baseless accusations about ramming, shoving, walking-away and the like, it's downright pitiful. Of course cost, circuit simplicity, consistency of results, flexibility, and power consumption are topics that aren't allowed in this discussion of merits, because the micro has an "unfair" advantage in these areas. It's not like "my camp" needs to recruit people, it's not the one in danger of becoming extinct.

Reply to
Anthony Fremont

OK John, I'll take your word for it. You certainly know tons more than me about electronics. I'll go back and read his original post and see if I can figure out why what I thought was a solution is not. Thanks, Eric

Reply to
Eric R Snow

Please don't feed the trolls. :-)

To explain it in a less belligerent way, the OP doesn't guarantee duty cycle or overall pulse width. This was further reitterated by the OP when JF didn't get it either and had to ask. Why he now thinks it proper to slap you around for making the same error, but I digress. The OP only cares about 10 pulses per second, and simply counting the pulses received in one second will satisfy his requirements. The one second latency to the output is of no concern either.

Reply to
Anthony Fremont

Obviously I left out the "is beyond me" part.

Reply to
Anthony Fremont

--
The berating isn\'t direct, it\'s in your attitude and in your disdain
for anything other than a PIC to be used as a solution to a problem.
Reply to
John Fields

--- Now, now, Anthony, be a nice boy, won't you?

He has in his possession, and I've posted to abse, the corrected version which _does_ work.

Moreover, I've come up with a simpler two-chip solution which uses a

555 made retriggerable which I'll post later on as soon as I simulate it. I don't think the OP's in a big rush and it's not like I'm doing it for the money, Eh?

BTW, are you going to do anything by way of showing that your way is the way he should go? You know, build something and test it since he certainly isn't going to do the programming himself, I suspect.

If you do I think it would be nice if you kept a log of how long it took you to write the code, how long it took you to debug it, and the bugs you found. Oh, and then post it here. The whole think shouldn't take more than about a day, should it?

-- JF

Reply to
John Fields

Guys thanks for all your posts, and I certainly didn't mean to start a PIC vs Traditional-Circuits argument. :)

JH: I got your email, but your attachment didn't seem to go through.. could you please re-send? I ordered the parts, should be here in a few and hopefully I could bring this circuit to a conclusion.

Chris: Thanks for your post. I can see John's point regarding 555 not being re-triggerable... John, could the re-set be used instead to achieve something of the sort ? (just a thought, but you probably know better)

As a side-note: I have nothing against PIC controllers, in fact, I think it would be great to learn how to use them... I would just prefer to do the learning as more of a side-hobby than a means to an end in this particular case. In fact, I would love to attempt this solution with a PIC also, so I'm totally open to suggestions as to where and what I should get as a starter kit, and any code would make this work (thats if its not too much work for anyone of course..) .. and again, I truly appreciate everyone's responses to my post.

Best regards, MC

Reply to
Mike C

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.