This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Help with uvision 3 and 89LPC936 with SPI

Dear All,

I am new in prograqmming the 89LPC639 and with the keil uvision version 3.
The problem that i face is that, when i try to start the SPI seems nothing happened.
First the SPDAT does not take the value that i try to put in.
Second in logic analyzer at pins which are for the SPI protocol nothing occurs. I could not know what i am making wrong so i hope a advance user could help me with that.

Also i am include the code.

void Spi_Send(unsigned int value){

P2|=0x34; P2M1 |= 0x34; P2M2 = 0x34; SPSTAT |= 0x80; SPCTL=0xD0; SPDAT=value;

while ((SPSTAT & 0x80)==0){ }

}

0