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
"did you look at the posting instructions about how to post source code?"
They are really quite clearly stated:
www.danlhenry.com/.../keil_code.png
Note that TABs don't work (well) - use spaces instead,
and don't forget to check it in the 'Preview'...