sir , I need to use hardware vic in lpc2148 instead of software interrupt ,i paste the program here what i m done in coding , but it's doesn't give any output. give me some suggestions.
#include<LPC214x.h> void UART0(void)__irq; int main() { PINSEL0 = 0x00000001;//pin function select register U0LCR = 0x80; U0DLL = 93; U0LCR = 0x03; U0IER = 0x00000002; U0IIR = 0x00000002; VICIntSelect = 0x00; //enable VIC channel as FIQ VICVectCntl0 = 0x20 | 6;//enable uart0 interrupt slot6 VICVectAddr0 = (unsigned int)UART0;//enable uart0 interrupt in vic VICIntEnable |= 1 << 6; // while(!(U0LSR & 0x20)); // U0THR = 'J'; VICIntEnClr = 1<<6; while(1); } void UART0(void)__irq { while(!(U0LSR & 0x20)); U0THR = 'V'; }
If you "coded" that with the same care and attention that you gave to reading the instructions for posting on this forum, then it's not surprising that it doesn't work!
The instructions really are quite simple an clearly stated - as shown in this picture: www.danlhenry.com/.../keil_code.png
Unreadable junk post and junk code.
Why have an interrupt routine that contains a while loop?