> > http://home.clear.net.nz/pages/joecolquitt/2wireled.gif > > http://home.clear.net.nz/pages/joecolquitt/2wireled.jpg > > http://home.clear.net.nz/pages/joecolquitt/2wireled.zip > > and > > http://home.clear.net.nz/pages/joecolquitt/counter.gif > > and > > http://home.clear.net.nz/pages/joecolquitt/message.html > > As Peter said, persistence of vision but i really don't see the point in using two extra chips when you can easilly get a PIC with sufficiant pins to do it without much help (still need the transistors on the common lines) > > For keypads/switches/buttons you do the reverse. Scan inputs > rather than scan outputs you can but for 5 buttons its not worth it. a 3x2 grid (the minimum that would cover it) would take just as many io lines as reading the buttons individually. also note if you want to correctly read multiple buttons pressed together you need diodes combined with the buttons (it would be possible to combine the switch inputs with the LED outputs but diodes would be required to make it work right). the whole point of microcontroller based design imo is to try and keep external cuircuitry to a minimum. One of the larger PICs plus a few helper transistors for the common lines on the 7 segment displays, a few pullups for the inputs, some power supply decoupling and a crystal cuircuit is all that is needed to satisfy the original posters design requirements. IMO using external chips to save IO is something you should only do if simply moving to a bigger microcontroller is not an option. There does of course come a point where moving to a bigger microcontroller simply isn't feasible (a hobbyist without surface mount skills can't really go beyond 40 pin devices) but in general by that point the project has got sufficiantly complex that multiple microcontrollers are probablly easier. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist