How to drive RGB LED controller with high frequency PMW?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
DiDi_4439146
Level 3
Level 3
First solution authored 10 sign-ins 10 replies posted

I have an LED controller where the RGB value is programmed with 24 bits of input data (attached to a GPIO pin)

The timings are 1.2 uS per bit. A high bit would be 0.9 uS high and 0.3 uS low - and a low bit is the opposite with 0.3uS High and 0.9uS Low.

So my question is how would I set up a GPIO pin on the FX3 to send a sequence of 24 bits at that speed? I was trying to use the example from:

Pulse on FX3 Complex GPIO – KBA228439

but wasn't able to get anything working since it seems like the calls between PulseNow would mess up the timing between bits. Thanks for the help!

0 Likes
1 Solution
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi,

If CPU is used in this waveform generation, the output may not be precise (as you have already tried calling pulsenow sequentially).

And there is no register configuration on complex gpios to alternate between two different thresholds, without CPU intervention to change the threshold.

Regards,

Hemanth

Hemanth

View solution in original post

0 Likes
3 Replies
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Please try to toggle the GPIO as required by making suitable GPIF state machine.

Regards,

Hemanth

Hemanth
0 Likes

Is there a way to do it without GPIF? I actually wanted to implement this on an SD3 - where there is no GPIF.

0 Likes
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi,

If CPU is used in this waveform generation, the output may not be precise (as you have already tried calling pulsenow sequentially).

And there is no register configuration on complex gpios to alternate between two different thresholds, without CPU intervention to change the threshold.

Regards,

Hemanth

Hemanth
0 Likes