stand alone counter - SN74LV8154

Hi All,
Forgive me but I am very new at all this. I am just starting into a project of an arduino on a motorcycle and I want to measure front and rear wheel speeds.

After some research I believe the most reliable way to do this is through a binary counter and a shift register. To that end I have bought a couple of dual 16bit counters (SN74LV8154) and a shift register (SN74LS673N). I think this hardware should be fine, as at max velocity its not going to be incrementing much faster than 40 times per second.

It almost sounds like I know what I am talking about - but I dont :slight_smile:

I have downloaded the datasheets for the SN74LV8154, but I am still pretty confused as to how to set up the counter to just increment on an input pulse from a wheel speed sensor.
I can see the 8 output pins (shouldnt there be 16?), the +ve and the ground, but I have no idea what the GAL, GAU, GBL, GBU pins are used for?

Does anyone have any layman's description of how to wire one of these up?

I haven't even got to the shift register yet!

any information or help or simple worked examples to look at would be a great help.

thanks everyone

Ian

That chip contains two 16 bit counters which can be used separately or daisy-chained to
make one 32 bit counter. The 8-bit output bus has 4 enable inputs so it can read out either
half of either counter as you wish.

The datasheet has a big timing diagram showing how it responds to the various clocking,
enable, carry and reset controls if I remember right. Read the datasheet, then read it
again (that's normal) and you'll start to see how it all works together.

You are right to use a shift register to pull out the 8 bits from the device (its a shame it
doesn't have serial output already).

The latch pin or whatever its called allows you to read a snapshot of the running counter
consistently (despite having to read each byte separately).

In general its never a good idea to reset a counter like this, just let it run and take the
difference between successive readings in software - then you cannot miss a single pulse.

This a great chip for implementing frequency counters because it will do upto 32 bits and
has the latch for consistency of reading, and its available through-hole or surface mount.

[ It would be a truly great chip if it had SPI or I2C interface, not the akward byte-wide bus ]

Hi Mark,
Thanks for the reply. I am just finding my feet with the electronics side at the moment and there is a lot I don't understand. I have been led to believe that my arduino mega 2560 will be more than capable of tracking these wheel speed inputs with its many interrupt pins.

I am going to give that a go for now, and possibly look at outsourcing the counting at a later date if the mega starts to struggle to do the counting function and all the other stuff I want it to do (GPS, Tyre temperature, data logger etc)

Thanks again

Ian