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

invert doesn't seem to work correctly when using pcm #337

Open
davthomaspilot opened this issue Nov 22, 2018 · 0 comments
Open

invert doesn't seem to work correctly when using pcm #337

davthomaspilot opened this issue Nov 22, 2018 · 0 comments

Comments

@davthomaspilot
Copy link

I have been using PWM (GPIO 18) without issues. However, I want to also use PIGPIO . It uses PWM, so I tried using PCM (GPIO21) for rpi_ws281x. It almost works.

But, everything is shifted by one. Pixel zero is not addressable. When I write to the 0th pixel, the first pixel gets written instead. When writing to pixel #1, pixel #2 gets written. Etcetera.

GPIO 18 and GPIO 21 are connected on the hardware, so I can easily switch back between PCM and PWM modes.

I'm using invert, since I have an inverter that does level shifting.

When using PWM, the signal quiesces high, which means the output of the invert is low when not writing to the LEDs. But, when using PCM, the signal quiesces low, which means the output of the inverter is high.

Perhaps, a long period of signal low resets the LEDs. But, when the signal is high (like what happens on the output of the inverter when PCM mode is used), spurious transitions don't get cleared. So, the first intentional write hits pixel 1 instead of pixel 0.

This is just a theory. But, I think the signal should have the same signal level in the inactive state, regardless of whether PCM or PWM is used.

This seems like a bug?

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

1 participant