Commit Graph

2 Commits

Author SHA1 Message Date
true
efaeb803a5 fix various bugs. editor button initial WIP.
setting cursor to off would keep its last state active. fixed.

cursor wouldn't turn off all the way and would glitch out. fixed.

cursor now has a nicer fadeout.

fixed potentiometer scaling factors.

tried fixing clockspeed stuff. with these changes clock speed can more reliably change to 24MHz or 48MHz, but this isn't thoroughly tested. 3MHz to 24MHz was still crashing. as ADC is in use, code would need to be refactored to not change clock speed while ADC is converting. since I don't want to do this right now, this will run at a fixed speed at the expense of 0.5-1mA.

editor buttons working and updated to the new arrangement, but not tested in depth.

pressing and holding to exit parameter editor while edit mode active would result in next entry into parameter editor being in edit mode. fixed.

lsens / stat LED now functioning in program and parameter edit modes.
2025-07-24 16:03:48 -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