> > The concern is I am using PicBasic Pro and it's serial routine either waits > > for a character berfore continuing on with the rest of the program,which > > does not help tracking the button status. Or has a time out which the > > lowest timeout is 1ms. This leaves a lot of time for other thing to be > > missed. > (No, I'll be nice here ) Put a cap across each switch, obviously > closing the switch will discharge the cap. > > Now, so long as your pull-up resistor is large enough that you have a > Tau of >> 1mS, you're covered. Say 1uF and 10k; yeah, I know, that's a > lot of real estate for caps! The caps can be ON the keyswitches, > though... (Assuming that the switches are from ground to a Stamp/PIC > pin, pin pulled up by the resistor, something like that.) Weak pullups > might be a good option here, to look at, if you move this to a PIC pin. How does this help ? The problem is that he has two asynchronous events to monitor and can only be looking at one at any point in time and therefore missing the other. There's no point in looking at switches more often than every 10ms (50ms is good enough for most cases), which reduces the probability of missing the address, but it is still there. It really needs the comms to be interrupt based and if the compiler doesn't support them, get into some ASM. Steve ====================================================== Steve Baldwin Electronic Product Design TLA Microsystems Ltd Microcontroller Specialists PO Box 15-680, New Lynn http://www.tla.co.nz Auckland, New Zealand ph +64 9 820-2221 email: steveb@tla.co.nz fax +64 9 820-1929 ======================================================