On Sun, 23 May 2010, Russell McMahon wrote: > > Thanks for the suggestions. Lots to think about! I might perhaps go for > > a PIC with a large number of inputs to make the circuit as simple as > > possible until I get more used to the PIC architecture & programming. > > At the risk of appearing to be just promoting a suggestion that I (and > several others) made, then, if speed is not an issue THE simplest > circuit is probably 12 x parallel in, serial out shift register IC's. > (Speed is 90 SRclock cycles plus a small setup overhead.)(SRclock is > shift register clock. Probably can be as fast as your code will go. > I have to agree with Russel, this would definately be the simplest solution and by far the quickest to implement software wise. Think about it, the PIC is controlling the rate at which data is being clocked through the "wide" shift register. You can make this go as slow as you need to while you are debugging your system (software AND hardware). You can even run it through a simulator or debugger (and single step without breaking anything). Now can you just imagine how hard it's going to be to debug two or more PICs running in parallel. Sure it would be fun to do, but for a first PIC project - no not really. And as Russell points out, you can start small using just one shift register and when you get that working for 8 lines, you can progress by cascading more shift registers between the first (known working one) and the PIC. All you need to do in the software is change a constant that is used to define how many inputs you are reading via the shift register. All this would be so trivial. Regards Sergio Masci -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist