Wagner Lipnharski suggested: >Just to use the opportunity: >An easy way to have a key and a indicator led connected to a single >microcontroller port pin is connect the LED (anode) with a resistor (330 >Ohms) to +VCC (+5Vdc) and the catode to the port pin, the key goes to >the same port pin to ground via another resistor (100 Ohms). This has a potentially fatal flaw - the LED resistor and the switch resistor form a voltage divider which means that the 'switch pressed' voltage at the pin drops to about 1 Vdc instead of 0 Vdc. The soloution is simple - put both resistors in series, with the mid point of the resistors going to the switch. dwayne Dwayne Reid Trinity Electronics Systems Ltd Edmonton, AB, CANADA (780) 489-3199 voice (780) 487-6397 fax Celebrating 15 years of Engineering Innovation (1984 - 1999) * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Do NOT send unsolicited commercial email to this email address. My posting messages to Usenet neither grants consent to receive unsolicited commercial email nor is intended to solicit commercial email.