Content originally posted in LPCWare by Sarvani A on Tue Apr 07 09:56:59 MST 2015 Hello,
Iam working on LPC18xx. LPC1857 has one PWM with three channels.Iam implementing three different operations on three different channels with different frequencies. Iam using the api's of the example code periph_sct_pwm which is attached below. I can able to program the PWM and generate a square wave but the problem is that all the channels are resulting in a common output frequency irrespective of their individual frequency.
Content originally posted in LPCWare by Sarvani A on Tue Apr 14 08:50:50 MST 2015 Hello,
Based on the above links information i have programed the SCTimer in split mode. But still iam getting common frequecy irrespective of individual frequencies.
Is it really possible to generate two independent frequencies using SCTimer in Split mode?
Please post some sample codes of SCTimer in split mode
Content originally posted in LPCWare by mc on Fri Apr 10 06:09:43 MST 2015 Hi Sarvani A, You can also use same SCTimer/PWM block in split mode( Two 16 bit counters) to generate 2 independent PWM frequencies.
Content originally posted in LPCWare by Sarvani A on Fri Apr 10 01:01:13 MST 2015 Ok, i will try with timer output. Thank you soo much for the response
Content originally posted in LPCWare by Sarvani A on Wed Apr 08 23:16:09 MST 2015 No, i dont want that.. I need separate frequencies.
In LPC1857, PWM has three channels. Iam using one channel for Buzzer with a frequency of 1.4KHz and other channel for LCD with a frequency of 300Hz.
Please do see the attached files
1. Configurations 2. Example code periph_sct_pwm with i took as reference (this is a rar file..please download and check) 3. Mcu_PWMControl.c - code where iam using the api's of the example code. In this code iam facing issue
Content originally posted in LPCWare by capiman on Wed Apr 08 02:26:46 MST 2015 You call the first one, it is set. Then you call the second one, and replaces the first. Is this really what you want?
Do you have two different PWMs, so you assign one frequency to peripheral 1 and the other to peripheral2?
Content originally posted in LPCWare by Sarvani A on Wed Apr 08 02:20:21 MST 2015 Hello,
I need to program two operations in that code. one is for buzzer and second is for LCD. Each of the operations has it's own frequency( not a common frequency rate) So i have defined two frequency rates PWM_RATE and PWM2_RATE PWM_RATE is for buzzer with a frequency of 10KHz PWM2_RATE is for LCD with a frequency of 20KHz
Content originally posted in LPCWare by Sarvani A on Tue Apr 07 23:23:47 MST 2015 Hello,
Yes, iam using the example code from LPCOpen.This example, uses the SCT PWM driver to create 2 independent PWMs (running at the same frequency) but iam trying to create 2 independent PWMs running at different frequencies.
Can you suggest me how to modify the example code to make it run with different frequencies.
Content originally posted in LPCWare by mc on Tue Apr 07 17:22:00 MST 2015 Hi sarvani, I do not see any source files in your project. Did you use example from LPCOpen? Did you modify it?