Looking for a pulse counter
Hans
Posts: 12
I've been on google for a couple of days now, and I can't find what I'm looking for.
What I would need is an IC that could count TTL pulses coming in at a rate of
about 5 PPS, and that could be read and cleared from the stamp via a CS, CLK and data
line much like many ADC IC's. I'm almost certain such an IC exists, but I can't find it.
Help.
Hans
What I would need is an IC that could count TTL pulses coming in at a rate of
about 5 PPS, and that could be read and cleared from the stamp via a CS, CLK and data
line much like many ADC IC's. I'm almost certain such an IC exists, but I can't find it.
Help.
Hans
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
how many pulses have occurred during a given time period.
Let me explain some more. I'm going to monitor fuel flow and water flow using flow meters
that generate TTL pulses when fluid is flowing through them. With COUNT I could measure the
rate at which the fluid is flowing. And I will surely do this. But what I also want to know is
how much fluid has gone through the meter. These meters generate 1800 pulses for every liter
of fluid that has passed thru them.
Now I could ofcourse scan all the input pins all of the time, and make the stamp the counter. But
this would use much of the stamp's time, and will interfere with the other functions it is doing.
It would be better if I could interface to an IC that does the 'stupid work' for it, and then
interrogate this IC at a time when the stamp is good and ready for it.
The project is a 'resource monitor' for my boat. It will monitor the battery banks, fuel tanks, water
tanks etc etc.
Greets,
Hans
period of time, counts cycles on that pin and stores the total in a variable. A cycle is a change in state from 1 to 0 to 1, or from 0 to 1 to 0."
With that said you could use a counter like 74LS590 to do this for you, say if you need to perform other functions while doing the counting, problem with this is that the output is parallel and thus requires many pins to interface with, but you could couple the 590 with a parallel in serial out chip to read the value in serially.
Post Edited (Paul Baker) : 4/26/2005 9:50:59 PM GMT
That said, COUNT would not work for me, because I need to count more than one
input, and while COUNT is counting one pin, the pulses on the other pins are lost.
And since I want to calculate the amount of fuel left in each tank, I don't want to miss any.
I will have a look at the 74LS590. Do you know a parallel in serial out chip that would work here ?
(man, this is going to be the biggest project yet. I can't wait to see my PCB with all them neato
chips on it sitting next to my shining 2SX doing all them calculations and making me look really clever)
Hans
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
I have two magnetic sensors. I need to measure the number of
times the pulse "changes" (0 to 1 or 1 to 0, not 0-1-0)
The Issue I have is that the travel is over a foot per pulse.
It's true that if the metal plate passes the sensor it would produce
a 0-1-0 for COUNT, but if it goes from 1-0 the it IS moving.
My understanding of COUNT is that it would not detect this movement.
Plus the max pulses per second would be around 12 or so.
For now I am just looping 250 times pausing 1ms. And reading the state
of both pins inside the loop. Something like this:
Main:
LeftTicks = 0
RightTicks = 0
FOR ReportTime = 0 TO 100
PAUSE 1
IF NOT (PinLeft = LeftLast) THEN LeftTicks = LeftTicks + 1
IF NOT (PinRight= RightLast) THEN RightTicks = RightTicks + 1
LeftLast = PinLeft
RightLast = PinRight
NEXT
Recode and clear ticks here.
Surly someone has a better solution.
abrobotics.tripod.com/Ebot/hardware.htm
I love the internet. No really.
Thanks Hans!!!
-Mark
come in inverted. I XOR'ed the value with 255 in the stamp's code to fix this. I haven't really looked at why it's doing this yet.
I'm gonna have a look at the specs of those IC's tomorrow. But so far it looks like my goal has come a
little bit closer now. Thanks guys.
Hans