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.
I am working on mcb2300 board. I want to generate a pulse from it.I wrote a programme for this.but when I run this program in the board all values got changed.the same program works efficiently in simulation.but on it is not working properly.My program code is as
#include <LPC23xx.H> /* include for LPC23xx */ void PWMInit() { /* considering LPC2368 */ PINSEL3 |= (0x02<<8); /* reset PWM counter */ PWM1TCR = 0x02; /* setup match control to reset on MR0 */ PWM1MCR = 0x02; /*Reset on PWWMR0*/ /* select single edge for PWM1.1... and enable PWM1.2 o/p */ PWM1PCR = (1 << 10); /* setup PWM period */ PWM1MR0 = 12000000000/500; /* setup PWM duty cycle (50%) */ PWM1MR2 = PWM1MR0/2; /* start counter and enable PWM */ PWM1TCR = 0x81; /* enable LER */ PWM1LER = 0x04; } int main() { PWMInit(); while(1); } please help me....