We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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; } }