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

Can atmega32a drivers ws2812 by bitbang? #8375

Closed
zzhs-zzz opened this issue Mar 11, 2020 · 6 comments
Closed

Can atmega32a drivers ws2812 by bitbang? #8375

zzhs-zzz opened this issue Mar 11, 2020 · 6 comments

Comments

@zzhs-zzz
Copy link

zzhs-zzz commented Mar 11, 2020

Hello, I have made a keybord with atmega32a. It has the rgb underglow, and i connected ws2812s with mcu's io pin directly(just like many atmega32u4).But now i find the ws2812s can not work. So is 32a not supported bitbang driver the ws2812?
Thank you for your answer .

@mtei
Copy link
Contributor

mtei commented Mar 11, 2020

I feel it is clock speed matter. If your atmega32a has enough clock speed, it should work.

// The only critical timing parameter is the minimum pulse length of the "0"
// Warn or throw error if this timing can not be met with current F_CPU settings.
#define w_lowtime ((w1_nops + w_fixedlow) * 1000000) / (F_CPU / 1000)
#if w_lowtime > 550
# error "Light_ws2812: Sorry, the clock speed is too low. Did you set F_CPU correctly?"
#elif w_lowtime > 450
# warning "Light_ws2812: The timing is critical and may only work on WS2812B, not on WS2812(S)."
# warning "Please consider a higher clockspeed, if possible"
#endif

@yulei
Copy link
Contributor

yulei commented Mar 11, 2020

ps2avr used an attiny to drive ws2812, so you need to buy this from author of ps2avr or write your own driver on attiny to translate i2c commands from atmega32a to ws2812 signal sequence. If your made the keyboard by yourself, why not just using atmega32u4?

@yiancar
Copy link
Contributor

yiancar commented Mar 28, 2020

yes they can, they work just fine and I have tried this.
I think this issue can be closed

@zvecr
Copy link
Member

zvecr commented Apr 1, 2020

From #8598, I had to modify the existing AVR implementation. 32a partially shares the same register config so i cant see how the existing code would work without the same changes.

Edit: raised #8646 or the attiny85 support but its worth trying for this case too.

@yiancar
Copy link
Contributor

yiancar commented Apr 1, 2020

is this about entering the bootloader?

@zvecr
Copy link
Member

zvecr commented Apr 26, 2020

Verified working on https://www.rgbkb.net/products/pan-keyboard-diy-kit by Legonut.

@zvecr zvecr closed this as completed Apr 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants