AnsweredAssumed Answered

How do I create a 38kHz signal with kl43z?

Question asked by Christopher Demos on Feb 9, 2016
Latest reply on Feb 11, 2016 by David E Seymour

Hello yall,

 

I need a 38kHz signal for the IR LED I am using. I'm using kl43z, SDK, and PE.

At the moment I'm using a for loop so it waits for 13 microseconds and toggle command to turn off and on the IR LED.

My code is the following:

I don't know if the for loop is creating the desired 13 micro seconds. But I did the calculation assuming a clock speed of 8MHz.

The clock might actually be 48MHz? So then I'd do 624 no-ops.

 

But alas, the circuit is not working. I got the circuit working on an arduino and downloaded a code that had the 38kHz signal.

 

Also bonus question, I haven't been able to get the GPIO_DRV_ClrPinOutput or the GPIO_DRV_SetPinOutput commands to work.

The only thing that works is the GPIO_DRV_TogglePinOutput.

 

Thanks for the help!

 

-Chris

Outcomes