> The 9th bit is an address/data bit. When set it indicates an address that > the packet it targeted for. Reset indicates data. > > The usefulness on the PIC is that that its USART can be configured to generate > an interrupt only if an address is sent. So the basic gameplan when you have > multiple nodes on the line: > > - Everyone sets up to just accept addresses. > - When an address is sent everyone is interrupted and checks the address. If the > address doesn't match, when go back to accepting addresses only. > - However if the address does match configure the USART to accept data. > > So once a matching address is sent, only the targeted station will receive the > data. All the other stations will ignore the line until another address is > sent. I think that is one of the things that can be done with it. I am simply using the 9th bit as a single address bit - if it is set, the "main" 8 bits are for one PIC, and if the 9th bit is clear the data is for the other PIC. > This issue comes up time to time on the list. Personally I always thought the > best tack was to attach the PC to a PIC which does 9 bits to the rest of the > network and uses a 8 bit software UART to talk to the PC. By the time you > finish contorting your Windows code to mangle the PC UART to simulate 9 bit > mode, you will have pulled all your hair out of your head. I thought of that, but I don't have a spare 873 here. > Since your final target is 2 PICs anyway, why waste time trying to get a PC > to simulate? The PIC that the PC is simulating a PIC which interfaces to a Microsoft digital joystick. I was having problems with that and wanted to put it on the back burner and work on the other (receive) side of the link and have a way to test out the serial input. The main reason I did it is to learn more about programming a Windows GUI program in C, instead of just the console stuff I do at school. Andy _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu