semickolon / fak

F.A. Keyboard Firmware
https://fak.keyb.dev
GNU General Public License v3.0
154 stars 31 forks source link

[Question] would it be possible to add support for CH551G? #8

Closed concprog closed 6 months ago

concprog commented 6 months ago

Hello! First of all, thank you for creating this awesome firmware. Honestly, it seems easier to use than the other ones I have seen.

I wanted to ask if it would be possible (hardware-wise) to port this over to the CH551G, as that it's the only one my seller has in stock.

Also, what are the differences between the CH55xG and CH55xT versions of the chip? I wasn't able to read the datasheets so couldn't figure this out.

semickolon commented 6 months ago

I think it should just work out of the box, because the datasheet for CH551 and CH552 is the same. The datasheet title says "8-bit Enhanced USB MCU CH552/CH551". I don't have a CH551G to confirm this, but let me know if it does work when you get the chance to try. Note that CH551 has half as much memory so you'll be more limited in how many features you can use.

CH552G/CH551G is SOP-16. CH552T is TSSOP-20. I believe there's no such thing as CH551T.

concprog commented 6 months ago

I found a side-by-side feature comparison of some CH55xG chips here image

concprog commented 6 months ago

Would the reduced ROM/xRAM/UART/Type-C support be an issue? (Sorry for accidentally closing the issue.)

semickolon commented 6 months ago

No, it shouldn't be an issue, at least to get FAK running.

Of course it would only be an issue once you have a more complex keymap/more layers where 10KB ROM might not be enough. 14KB can be all used up on a CH552 now with a keymap complex enough. Only 512B of xRAM also limits how much you can add.

Either way, a bare minimum keymap should work on a CH551.

concprog commented 6 months ago

Where would something like a default 60% layout stand in terms of ROM/xRAM requirement? (also, is round-robin supported? that would make a 60% possible with only one CH551)

semickolon commented 6 months ago

60% would most likely work. It doesn't use many features and won't take up much flash and memory.

We don't have round-robin/charlieplexing, unfortunately. Only duplex matrix is planned to be implemented at the moment.

concprog commented 6 months ago

Okay, got it! I'll keep an eye out for when it is implemented, and thank you so much for answering all of my questions.