> Sounds like you have had a bit of a rough time with this.. Quite Here's a curious thing Works mov #0xff,w0 call send_w0 bclr SPI1STAT,#SPIROV btss SPI1STAT,#SPIRBF bra $-2 mov SPI1BUF,w2 send_w0: mov w0,SPI1BUF ;load SPI buffer call usec50 ;wait at 368.64kH return Don't works -=20 mov #0xff,w0 call send_w0 btss SPI1STAT,#SPIRBF bra $-2 mov SPI1BUF,w2 send_w0: mov w0,SPI1BUF ;load SPI buffer call usec50 ;wait at 368.64kH bclr SPI1STAT,#SPIROV return 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 Joe --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .