Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up PWM #1

Open
jake653 opened this issue Sep 16, 2019 · 2 comments
Open

Speed up PWM #1

jake653 opened this issue Sep 16, 2019 · 2 comments

Comments

@jake653
Copy link

jake653 commented Sep 16, 2019

I was interested in a Persistence of Vision project, can someone verify that the Poker Mode which adjusts the PWM data size does not? change the PWM output timing (I fear it is always taking 65536 Gclock cycles)

@s-light
Copy link
Owner

s-light commented Sep 24, 2019

hi @jake653,

Tldr: if i understand it correctly it displays only as much bits as you send.

its a while that i have experimented with this..
and if i remember correctly the poker mode is not implemented in the library yet at all...
or in the mean time you can use the arduino lib with this i think it is fast enough without poker mode.
feel free to create a pull request ;-)

i think CircuitPython is a bit slow for POV - as you really need mega fast updates
and the chip has the issue that it needs the latch puls timed to the clock of the Data.
and currently i have implemented this part as bit-banging - so it is relative slow..

Details:

9.3.6 Poker Mode
Poker Mode provides the TLC5957 with a flexible PWMbit, from9 bit to 16 bit. Therefore, data length can be reduced. In high multiplexing applications, Poker Mode can significantly increase visual refresh rate

in the AppNote there are more information: 3.4.3PokerModefor GS Data

and i also did a quick search in the TI forum:
TLC5957: How to input GSCLK

15/4/2019 10:52 Sean Lin1
Hi Kenneth,

Q1. As GS Counter is 16 bit, if we enable "Auto Display Repeat" & use continuous GSCLK, below two options which one is correct?

  1. The OUTn PWM On/Off signal will auto repeat according to PWM bit count
    ex: 16 bits PWM will repeat every 2^16 GSCLKs
    12 bits PWM will repeat every 2^12 GSCLKs
    10 bits PWM will repeat every 2^ 10 GSCLKs
    ...
  2. No matter the PWM bit count, it will all auto repeat PWM On/Off signal every 2^16 GSCLKs
    => if this is the case, when using 10 bits PWM for example, will OUTn turn off between GSCLK >1024 th ~ 65534 th?

Q2. As GS Counter is 16 bit, if we enable "Auto Display Repeat" & use continuous GSCLK, is the GS data only updated & applied every 65535 GSCLK
NO MATTER the PWM bits count?
(if so, i think it's the reason you say how it effect the refresh rate)

Q3. If we enable "Auto Display Repeat" & use continuous GSCLK, Do u suggest we use as higher frequency as better?
will the frequency we input GSCLK effect the LED drive result?

16/4/2019 9:35 Kenneth Du
Q1. Option 1 is correct. If you use 12 bits, it repeats every 2^12 GSCLKs.
Q2. You can use poker mode to send N(9-16) bits data, and the total period is 2^N GSCLKs. Thus you can improve the refresh rate.
Q3. The output PWM frequency = GSCLK Frequency/2^N * 128. So higher GSCLK results to higher OUTPUT PWM frequency.

Thanks and best regards,

Kenneth

other things

my idea was also to use this driver for POV..
and the poker mode was one reason i choose it ;-)
i have not tested it in this configuration -
but have some boards laying around..
you can find all the information i collected over time regarding POV at my 'ortogere project'

i also have a TLC5951 laying on my table -
it could have some really nice options for POV...
but i did not tried anything with it yet..

@s-light
Copy link
Owner

s-light commented Sep 24, 2019

additionally regarding PWM-Speed have a look at adafruit/circuitpython#1363

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants