Hi all, I'm doing SPI on a project and I'm new to spi. How do i assign the register sspcon1 and sspstat?
Is it this (at declaration):
Code:
#define sspcon1
#define sspcon2
#define sspstat
Or this (at declaration):
Code:
# byte sspcon1 = 0x20
# byte sspstat = 0x00
Or this (in main code):
Code:
sspcon1 = 0x20;
sspstat = 0x00
Or other method? I tried the first and second declarations above but my code didn't work. I tried the third declaration but compiler said "the line has no effect". What should I do? I just want to perform the most basic spi of master send data to slave using PIC16F877A for both. Pls help.
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Sat Dec 19, 2009 10:46 pm
Do you have the CCS compiler ? The following links show how to
write SPI code if you have the CCS compiler:
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