I haven't done this in a long time but here is a snippet of code I used to send by SPI to a device:
Low PORTA.3 : Pause 10 'CHIP SELECT
ShiftOut PORTC.5,PORTC.3,0,[9254\16] 'playconfig0
ShiftOut PORTC.5,PORTC.3,0,[114\8] '1st play byte
High PORTA.3 : Pause 10 'deselect - end of word
The 0 after portc.3 means send code LSB. A 1 would send it MSB.




Bookmarks