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

MCB 2100 SPI problems!

Hi!
I have problems with mcb2100 !Iam trying to use SPI on this board,sck is working well but problem is, that i don't ever get anithing in S0SPDR or out of this register.Is it posibel that i physically destroyed MIOS pin on chip!i have external pullups on SSEL!
This is the code!

#include "lpc21xx_keil.h"

int main(void)
{
  int i;
  PCONP |= 1<<8;
  S0SPCCR = 0X80 ;
  PINSEL0 |= 0x5500;
  S0SPCR |= 1 << 4;
  S0SPCR |= 1 << 5;
 while (1)


 {


while (!(IOPIN0&0x20)){} //(MISO mora biti 1) must be 1

S0SPDR = 0x0;   //start SPI transfer 1st byte

while (!(S0SPSR & 0X80)){} // cakaj na koncan SPI
transfer
i=S0SPDR;

}
}

0