I have two set of functions named as same Writetoreg (byte).
I am bit confused to see them as I don't know what is actually happening in them , my 1st effort will be to understand this.
I am talking about the SSPBUF and SSPIF things in this.. thanks.
Code:
void Writetoreg(int byteword)
{
PORTA &= 0x04;
SSPBUF = byteword;
while ( !(PORTA & 0x04) )
;
PORTA |= 0x20;
}
void Writetoreg(int byteword){
PORTA &= 0x05;
SSPBUF = byteword;
do
{
;
}while(SSPIF==0);
SSPIF=0;
while(!(PORTA&0x04)){
;
}
}
mkuang
Joined: 14 Dec 2007 Posts: 257
Posted: Tue Aug 04, 2009 3:32 pm
What are you trying to do exactly? Is there any reason why you are not using the build-in spi_read() and spi_write() functions with 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