Hi everyone, I am using SPI protocol to exchange data between two PICs. The master will send the "location" byte first (to tell the slave where the data should be written to) and the actual data byte. How should I write the code so that the slave knows which byte is the "location" byte and which byte is the data byte? - The "location" and data byte can be from 0 to 0xff. - The location byte is always sent first. - Use interrupt to get the spi data Please help! Best regards, Thomas --------------------------------- Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads