On Tue, Mar 19, 2002 at 09:26:10AM -0000, T Vavouras wrote: > I have two 16F84 ('slaves') each reading an 8button keypad. I configure portb > of each PIC to read the input. I need to send the 8bit input state to a > 'master' (probably a 16F877) once there is a change (a button is pressed or > released). Can i do it just using an RX and a TX line? how? if not possible, > what else do you suggest? a few suggestions: 1) Anooying administrative note. Could you hard wrap your lines of E-mail? Thx. 2) Upgrade to 16F628's they bring hardware to the table, like a true 9 bit hardware USART. 3) Consider Using EIA485 for multidrop operation and 9 bits on the USARTS for addressing. I'd consider full duplex instead of half duplex to keep things simple. Then it's a piece of cake. The primary transmits the address of the secondary it wishes to communicate with, the selected secondary interfaces with the primary over the return channel. Since it's full duplex both the primary and secondary can talk to one another without having to reverse the RX/TX bits on the EIA 485 transceiver. When done the primary then selects the next secondary using the 9 bit address mode. It deson't get much simpler and you can in fact add as many secondaries to the system as you wish. Finally with some judicious interrupt programming, non selected secondaries can go on their meery way and only be interrupt when an address comes down the pipe. It can completely ignore any data passing between the selected secondary and the primary. The only drawback in this system is that secondaries cannot communicate directly with one another without some work. As wiried the primary broadcast to all secondaries and each secondary can use the return channel to talk only to the primary. Just some thoughts. It's simple, efficient, and effective. BAJ -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics