Use a pic with a hardware uart, write the program to monitor the push buttons and write an ISR to monitor the RS485 network. Regards Stuart Mathew Cohen wrote: > > I am constructing a device that sits on a rs485 network. The device > constantly listens to the network for information that may relate to its > device number. The device also has 16 push buttons that need to be monitored > at the same time. I am currently using a shift register to clock the push > buttons in. > 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. > > Can someone suggest how this could be done effectively. > > Mathew Cohen.