Commit Graph

3 Commits

Author SHA1 Message Date
true
35653d25e3 changed ADC range for pot; ADC seems to work fine now
this chip uses 12-bit ADC, vs 10-bit on old chip. I tried to limit the pot within
a small range, but it still wasn't working as expected until I did this.

have no idea. don't code without sleep.
2025-07-24 06:23:14 -07:00
true
f8a987a592 soft I2C implemented, LEDs are now lighting
copied over and modified for use my CH59x soft I2C.

CH32X GPIO does not have an open drain mode, so I have to implement this with RMW to the mode register. After doing this and adding missing functions needed for existing code, LED writes and EEPROM reads and writes.

using the AWU for system timing so the clock speed can change.

existing issues:
- changing clock speed divider in soft i2c routines causes the system to crash
- ADC seems to be reading, but result isn't being used
2025-07-24 06:19:24 -07:00
true
805489c98f initial commit of in-progress port
what remains to be done:
- soft i2c master timings
- clock mode switching and render compensation when using i2c master code
- testing
2025-07-24 03:37:26 -07:00