- {l Code}: {l Select All Code}
void main(void)
{
char temp;
InitSysCtrl();
Init_SPI();
SpiaRegs.SPICTL.bit.TALK=1;//FS pin control
TX_SPI(0X016a);
SpiaRegs.SPICTL.bit.TALK=0;//FS pin control
while(1);
}
It enters into read and change by control The FS pin’s falling edge which connects TALK in main function. Then pulling up and finishing and sending function.
void TX_SPI(char c)
{
while(SpiaRegs.SPISTS.bit.BUFFULL_FLAG==1);
SpiaRegs.SPITXBUF=c;
while(SpiaRegs.SPISTS.bit.BUFFULL_FLAG==1);
}
。。。。。。There is no any problems
In the initialization:SpiaRegs.SPIBRR=0x07;
Could anybody here help me? Your help will be appreciated!