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 am currently working on the mcb2300. the timer0 is used.Iam just toggling the led ports.In the simulation i am able to get the output but regarding the hardware i am not able to see the toggling of the led's.
Here i am posting the code snippet.kindly help me to solve the problem.
Thanks in advance....
#include<stdio.h> #include <LPC23XX.H> void T0isr(void); void time_init(void); void delay(void); unsigned int value; void led_init(void); void delay(void); int main(void) { PLLCON=0x00; CLKSRCSEL=0x01; CCLKCFG=0x03; PCONP=0x00000002; time_init(); T0PR=0x0000C6C0; T0TCR=0x02; T0MCR=0x0003; T0MR0=0x00000005; T0TCR=0x01; //T0CR0=0x01; T0TC=0x00; //T0CTCR=0x00; T0PC=0x00; FIO2DIR=0x000000FF; FIO2MASK=0x00000000; FIO2SET=0x00000055; FIO2CLR=0x000000AA; T0IR=0x01; VICVectAddr4 = (unsigned)T0isr; VICVectPriority4=0X00000024; //Enable the interrupt VICIntEnable |= 0x00000010; while(1); } void time_init() { PCLKSEL0=0x0000000C; PINSEL3=0x03000000; PINMODE3=0x00000000; } void T0isr(void) { FIO2CLR = 0x000000AA; FIO2SET = 0x00000055; T0IR |= 0x00000001; //Dummy write to signal end of interrupt VICVectAddr = 0x00000000; }