On 14/08/2011 04:00, IVP wrote: > The difference ? The 'return' it seems > > Works OK too > > mov #0xff,w0 > call send_w0 > bclr SPI1STAT,#SPIROV > .... any number of cycles .... > btss SPI1STAT,#SPIRBF > bra $-2 > mov SPI1BUF,w2 > > Weird That does seem weird, yes. Have you any idea what the return might be=20 doing to cause problems? Have you had a look at what is happening to the various registers involved? How exactly does it not work - does it even load SPI1BUF the first time=20 round? --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .