Generating the different frequencies using timer match registers??

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Generating the different frequencies using timer match registers??

856 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by alex-jhon on Mon Aug 03 00:13:38 MST 2015
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. Now I'm getting 0.1HZ using MATO register
suppose I need to generate 1HZ frequency simultaneously how to do it?????

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

0 Kudos
Reply
3 Replies

844 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by alex-jhon on Mon Aug 10 22:02:48 MST 2015
Hi Friends...

anyone please help me to generate the 2 different frequency using timer16BO of LPC1115 micro controller.

0 Kudos
Reply

844 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by alex-jhon on Tue Aug 04 21:51:56 MST 2015
Hi,

Thanks for the supporting me..

I want function coding mention in below.

so I'm using MAT0 register of CT16_BO timer to check for the out put.  so I need to generate two different PWM frequencies at a time. say 10.1 Hz and 12.1 Hz (for example).

please help us!!!!!

init_timer16PWM();
setMatch_timer16PWM();
setMatch_timer16PWM();
enable_timer16(1)
0 Kudos
Reply

844 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Mon Aug 03 03:24:44 MST 2015
Forum Search:

https://www.lpcware.com/content/forum/generate-2-pwm-signal-on-lpc1114-using-1-timer-16-bit
0 Kudos
Reply