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 forum i am using LPC2129 in keil-3.53 When i config the spi-0 and spi-1 simulate its working fine. But when i dump the code into my board i am not getting any signal at that pins.(both sck0 and mosi-0) here my code...
***************************************************** #include <LPC21xx.H>
static void SPI0_Init(void);
int Send_Data (int data);
int main (void) {
SPI0_Init(); while(1) { Send_Data(0xaa); } }
static void SPI0_Init(void) {
VPBDIV = 0x00; PINSEL0 = 0x5500; S0SPCCR = 10; S0SPCR = 0x20;
}
int Send_Data (int data) { S0SPDR = data; while (!(S0SPSR & 0x80)) ; return (S0SPDR); }
************************************************* any one plz... tell me where its getting wrong
regards sriram.k
i am sorry....
#incude <LPC21xx.h> static void SPIO_Init(void) { VPBDIV =0x00; PINSEL0 = 0x5500; S0SPCCR = 0x08; S0SPCR =0x20; } int main(void) { SPIO_Init(); while(1) { S0SPDR =0xaa; while(!(S0SPSR $ 0x80)); } }