Greetings.
I'm working on a model railway project where I need to have a number sensors to identify which lengths of track are occupied by a loco.
To minimise the number of arduino pins I need to tie up I'm planning to use a multiplexer, either a 74HC4051 or a CD4051BE. This could later be extended wth more channels as the layout grows. The arduino will be doing a lot more than just reading these sensors so I want to minimise the time this process takes
My problem is twofold:
a) How fast I can address and read each channel -- I understand the the 74HC4051 is much faster than the CD4051BE so this would cause less overhead in the entire process. What I can't identify is how much faster.
The TI spec sheet for the CD4051BE shows a Propagation Delay Time -- Address-to-Signal OUT (Channels ON or OFF) of 450 - 720 ns for a 5v system.
Allowing for the time to write the addresses and process each reading I'm reckoning on about 1ms per channel per iteration.
Unfortunately I've looked at various manufacturers' specs for the 74HC4051 and can't find an equivalent entry for the 74HC4051. Is it likely to be of the order of ten times as fast? This will become more significant in a bigger layout with more tracks.
b) Given the time it takes from writing the third bit of the address to getting a stable output from the MUX common pin is there any way I can avoid just putting in a delay time or a timing loop while waiting for the signal to stabilize? I can't think of any. Of course, using a faster device would at least minimise this.
Albert