Modern version of PISO chip?

grim_reaper

Senior Member
I'm thinking about a new project, which without going into detail, will require reading the state of around 40 reed switches. Usually I head straight for the 74HC165 (8 bit parallel in, serial out shift register), but I've noticed on several suppliers sites that they don't stock it any more.
I did a quick forum search and got this recent thread which references PCA9555 (16 bit I2C expanders) - I thought 'Yay! Newer technology!'.
Unfortunately, I don't have any experience with surface mount soldering (willing to try, but not at £4 a chip!) or designing boards for said system. 90% of my circuits reside on breadboards for years and only get assembled onto Veroboard when they are deemed reliable and I run out of breadboards!

So aside from the options of paying a larger amount for a break-out board with a PCA9555 on it, or getting 74HC165 chips from E-bay (with the associated risks), is there any kind of DIP chip anyone knows of that's as cheap as the 165? Preferably 16 bit and I2C like the PCA!
What other options are there for monitoring lots of individual digital inputs (aside from using 40X2s! - the reeds are in groups of between 6 and 15, so that would make wiring messy)?
 

hippy

Technical Support
Staff member
You could use M2 chips, one for each group of inputs. You can create a simple multi-drop serial link where the first is triggered to send its input data and then signals the next to do the same.

You should end up with a nice and simple system which allows the controller to ask for data and receive it back, and you could wire the whole thing by daisy-chaining the input boards with 4-core alarm cable; +V/0V/data/trigger.
 

jims

Senior Member
Could the 40 reed switches be wired as a 5x8 matrix and scanned as with a keypad? A 20m2 should have enough inputs to do the job. JimS
 

grim_reaper

Senior Member
An i2c IO Expander chip from microchip with 2 x 8-bit bidirectional ports is the MCP23017 ...
Thanks Westy, that's worth noting down. I'm sure something bi-directional will crop up some day.

What is the problem with purchasing the 74HC165 chips in DIP packaging? ... The Texas Instruments Datasheet addendum dated June 2014 gives the production status of the DIP package as "ACTIVE ...
I was only browsing around quickly at lunchtime, but I saw SparkFun and some others I can't remember listing the 165 as 'no longer available'. I guess it's lack of demand rather than availability! I'll stick with the 165, thanks!

Could the 40 reed switches be wired as a 5x8 matrix and scanned as with a keypad? A 20m2 should have enough inputs to do the job. JimS
Good idea JimS, but the switches are in groups, of varying sizes and metres apart.

You could use M2 chips, one for each group of inputs. You can create a simple multi-drop serial link where the first is triggered to send its input data and then signals the next to do the same.

You should end up with a nice and simple system which allows the controller to ask for data and receive it back, and you could wire the whole thing by daisy-chaining the input boards with 4-core alarm cable; +V/0V/data/trigger.
Nice sales pitch there Hippy ;) but my overall system already works that way. This is just for a new bunch of inputs into a massive system.
 

jims

Senior Member
I have question... how is switch bounce handled when reading a bank of several non-synchronized switches using something like the MCP23071 IO expander discussed here? Would it be done with hardware, or is there a way to handle it in the code? Thank you, JimS
 

edmunds

Senior Member
I believe the delays related to taking interrupt high to notify picaxe something was switched and picaxe reading the inputs through I2C are enough to take care of this with all but the worst switch bounce cases.

Edmunds
 

jims

Senior Member
I believe the delays related to taking interrupt high to notify picaxe something was switched and picaxe reading the inputs through I2C are enough to take care of this with all but the worst switch bounce cases.

Edmunds
Thank you... JimS
 

edmunds

Senior Member
(willing to try, but not at £4 a chip!)
I did not notice this point before, but you should not pay more than 2euro for this chip. I don't know if it is ok to reference specific sources according to the forum rules, but Google should get you a better price than 4 GBP and if not, PM me. I'm looking and 1.68e and 1.86e prices per unit if you buy only one piece as we speak. HWQFN-24 package (which you will likely not want, because that requires picaxed toaster oven to solder) comes at 1.21e per unit if you buy one and even less if you buy 10 and upwards. Next day delivery.

Edmunds
 
Top