marthoma
Junior Member level 3
- Joined
- Oct 15, 2014
- Messages
- 25
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 171
Sir i have completed the message sending part from sim908 to lpc 2148 using the polling method..Now i wanted to do the same with interrupts...i hd written the code for it which i have attached here buts its not working for me...i am not receiving any characters from sim908 now...
please let me know where i am gng wrong in the code.....
please let me know where i am gng wrong in the code.....
Code:
void USARTInit()
{
PINSEL0 = 0x00000005;
U0LCR = 0x83;
U0DLM = 0x00;
U0DLL = 0x61;
U0FCR = 0X07;//ENABLE FIFO
U0LCR = 0x03; U0IER = 0x00000003;
VICIntEnable |= ((1<<6)|(1<<7));
VICVectCntl1 = (1<<5)|6;
VICVectAddr1 = (unsigned int)myGSM;
}
void myGSM(void) __irq
{
unsigned char p;
p=U0RBR;
if((p=='A'||p=='a')||(p=='T'||p=='t'))
{
U0IER=0x00;
arr_gsm[i++]=p;
U0IER=0x01;
}
VICVectAddr = 0x00;
}