Hi All,
First, I am a complete NEWB when it comes to MCU's and MCU programming. I have a decent background in programming (experience with C, pascal, java, and python, but absolutely none on MCU.
That being said, I've begun working in a lab environment, and my first project is to get our MK64FX512VLQ12 Kinetis K64 MCU to generate a sine wave with the following requirements:
1hz to 1mhz frequency
1mV RMS amplitude
My lab manager said that obviously we don't expect to need the whole range of frequency, but possibly any value in between.
I've done about 8-10 hours of google searching on this at this point, and I'm coming up fairly short on solutions. It may be that I'm looking in the wrong places.
Does anyone have any sample code of generating a sine wave using the MK64 product? Or perhaps any site they'd recommend referencing to help do this?
Also what kind of compiler will I need to write this code?
Would REALLY appreciate your help!
Thanks
Mike
Hi Mike,
Please refer this article
An example project for FIR function implement on KV31 with SDK and CMSIS
it includes using CMSIS DSP function to generate sine wave. the method is the same for K64F.
can it help you?
Have a great day,
Zhang Jun
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Zhang,
Thank you for your reply! I've had a look and I think that will help. As I'm very unfamiliar right now with the different variables, calls, etc in the code, it doesn't make 100% sense to me yet. But, I'll review it.
The creation of the sine curve looks fairly simple. I guess the q15_t is a specific function for freescale processors that truncates the value or something?
I also need to do some reading/referencing on what pins I need to call for the MK64 to output this sine wave.
So, yes, I'll review this, thanks so much!
you are welcome!
Have a great day,
Zhang Jun
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------