That's an older data sheet. The latest data sheet is for the Rohs version,
and it has sample PIC ASM code near the end:
http://www.lsicsi.com/pdfs/Data_Sheets/LS7366R.pdf
The ASM code could be translated to CCS.
There is also a schematic (Figure 14) that shows how to connect it
Read the comments in the first section of their code, which is called
"initialize portc".
They use the hardware SPI pins on the PIC, and they use pin A5 for
the \SS (slave select) pin. That's stated in the comments.
It's not critical that you use pin A5 for \SS. It's probably more
convenient to use a free pin on Port C instead. I'd just choose pin C0.
Also, on some PICs pin A5 is an input-only pin. It can't be used for \SS.
From reading the comments and also looking at their timing diagrams,
you can see that they use SPI mode 0.
http://www.totalphase.com/support/articles/article03/#modes
They also say they use SPI CLK/16. That's enough information to
write the setup_spi() statement.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum