Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 8 months ago.
Generating the different frequencies using timer match registers in LPC1115 ARM controller??
Hello,
Presently I'm working on LPC1114FBD48 pin micro controller.
I need to generate the different frequencies at a time using timer of match register. for ex>using MATO register generate 1hz freq and using MAT1 register gennerate 2hz......simultaneously how to do it?????
and checkinh the output at MAT0 and MAT1 registers. below is my code part.
please help us to complete the task.
int main(void) {
SystemInit();
LPC_SYSCON->SYSAHBCLKCTRL |= (1<<16) | (1<<6) | (1<<8); clock enable for GPIO,IOCON and timer 16 bit. LPC_IOCON->PIO1_9 |= (1 << 0); Pin no 17 = CT16B1_MAT0(checking out put ) LPC_TMR16B1 ->MR0 = 3500; 11200; 50% Duty Cycle LPC_TMR16B1->PR = 131100; 262000;17000; LPC_TMR16B1->MR3 = 7000;22900;; Cycle Length LPC_TMR16B1 ->MCR |= (1 << 10); TC reset on MR3 Match LPC_TMR16B1 ->PWMC |= (1 << 0); PWM Mode channel zero fro CT16B1. LPC_TMR16B1 ->TCR |= (1 << 0); timer control
}
Thanks in Advance alex-jhon