Discussion in "Project Addition or Changes" started by    Praneeth1299    Apr 10, 2018.
Tue Apr 10 2018, 02:46 pm
#1
Hi,

I'm generating constant frequency of 1hz and variable frequency from 1hz to 10hz frequencies, using lpc214x MCU, but not able to get the pwm output of 0.01hz frequency, and is it possible to measure the same frequency in oscilloscope?
Please suggest.


Thank you
Tue Apr 10 2018, 11:42 pm
#2
The lpc214x has a 32-bit prescaler , so I would expect 0.01hz
to be possible, but very coarse.
What is it for ?

How close can you get, can you post your code ?

0.01hz gives a period of 100 seconds, a stopwatch would be more use than
an oscilloscope.


Fri Apr 27 2018, 05:08 pm
#3
Sorry for the delayed response sir, Below is the code which generates 1hz constant frequency, please find the attached code of 1hz pwm generation.

That generates 1hz frequency using prescaler value, actually I need to generate 9.62hz
frequency, i'm getting 9.6hz now, but to generate 9.62hz I need resolution of 0.02, so I asked for 0.01hz pwm generation..

Thank you
Sat Apr 28 2018, 12:42 am
#4
The code did not attach.
Try zipping it first.
Sat Apr 28 2018, 12:00 pm
#5
Please find the attached zip code.
Attachment
Sat Apr 28 2018, 12:02 pm
#6
Attached code main.c only..
Attachment
Sun Apr 29 2018, 01:52 am
#7
Nice to see lots of comments.
It makes it much easier to understand the code.
Why are you setting the pre-scaler to 1mS ?
Choose a pre-scaler value that gives you the 0.01 Hz precision you want .
You could just leave it a 60MHz.






[ Edited Sun Apr 29 2018, 02:14 am ]
Mon Apr 30 2018, 09:08 pm
#8
Yes sir checking the frequency by setting the prescaler value for 0.01hz,
will try setting the value correctly again.

Thank you

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

AntoniaRoons
Fri Apr 19 2024, 09:59 pm
carpinteyrowrl
Fri Apr 19 2024, 02:51 pm
DonaldJAX
Fri Apr 19 2024, 01:08 pm
Lewisuhakeply
Thu Apr 18 2024, 06:00 pm
Darrellciz
Thu Apr 18 2024, 11:07 am
Charlessber
Thu Apr 18 2024, 09:29 am
BartonSem
Thu Apr 18 2024, 04:56 am
DonaldKnown
Thu Apr 18 2024, 12:24 am