| ??? 03/30/03 13:58 Read: times |
#42549 - RE: Using P2 and external RAM Responding to: ???'s previous message |
1)you can't as described, the DIP switch need be connected to ground on one side and VCC through a resistor (10k sounds good) on the other and the connection between switch and R to tye port pin. This will permanently ground the port pins where the switch is closed. The right way to do it would be to read them multiplexed to a port. A crummy, glitchy stupid scheme you may try if what you are making is to do as above and instead of the switch common use a P1 pin that you pull to ground while you read the switches. This WILL fail if you are using external program memory, if an interrupt happens or a few other things occur. multiplex the silly switches, do not try to circumvent good design practice
Erik |



