F84 has got a full port B and RA0-3 Seven bits for the display and one spare (port B) RA0 digit 0 RA1 digit 1 Seven buttons on port B That leaves RA2,3 and RB7 spare you can do an LCD with three wires as well Leaves space for three spare pins and up to seven buttons Crappy ascii sketch E---+5v RA0,1----R1-----B C | com anode-------internal to other segments | led cathode | R2 RB(x)-------------| R3 | sw1 | 0V R1 22k base resistor R2 470R digit resistor R3 4k7 switch resistor Transistor PNP any to take led current Principle 1. set up the digit pattern on port B digit 0 2. make RA0 low 3. make RA0 high 4. make port b inputs 5. read buttons (active low) 6. make port B outputs again 7. set up pattern for digit 1 8. make RA1 low 9. make RA1 high 10. short wait or do sumfing else 11. repeat Its an idea and works on paper Regards Steve... -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of Vlad Sent: 09 February 2004 20:46 To: PICLIST@MITVMA.MIT.EDU Subject: [PIC:] multiplex 7seg LED with drivers Hello folks, I'm in the process of designing a toy circuit to keep track of life counters for various games. It should support 3 players. Each player will have two 7 segment LED displays that will display a number between 0-99, and also 2 switch buttons that will be used to increase and decrease the number displayed on these LED displays. I have a handful of 16f84 PIC's and currently learning how to program them. With only a limited number of input/output pins on this chip (13 I believe) what would be a good way to allocate these pins for the switch buttons and displays? I have read various articles in the Usenet archives which suggest multiplexing displays, this requires 7 pins for each segment and 1 pin for every other display. I think this will eat up in to all my pins though. Can I use the same multiplexing technique with a single display/driver chip? Any suggestions? Also any thoughts on the switches? This is my first electronics project and PIC programming project (ambitious, yes) Thanks -v -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body