Repository navigation
enable-1mhz-correct-visually - #159
Open
livingkurt wants to merge 3 commits into
Open
livingkurt wants to merge 3 commits into
livingkurt wants to merge 3 commits into
Conversation
… 1MHz-safe ISP clock + CPU_SPEED=1MHz Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ion operations and adjusting ISP clock settings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enable 1MHz CPU speed
Runs Helios correctly on the ATTiny85 at 1MHz (down from 8MHz) for lower power draw. Firmware still fits (8006/8192 bytes).
Why these changes
At 1MHz there are only ~1000 CPU cycles per 1ms tick. The ATTiny85 has no hardware divide, so every 32-bit
/or%is a ~240-cycle software routine. A few of these run every tick, which pushedHelios::tick()past its 1ms budget and made patterns visibly drag. Each change removes one such per-tick divide:% m_alarm./ MENU_HOLD_TIME.hue / 43(bit-exact,region_base[i] == i*43).micros()scales by64000000/F_CPUso timing tracksF_CPUautomatically.CPU_SPEED=1000000L, avrdude-B10(1MHz-safe ISP clock).Why tests were re-recorded
48 menu/hold/toggle recordings were made against the old 8MHz timing. The changes shift when the timer fires relative to menu transitions — same colors, same length, just shifted frames (no behavior added/removed). These were re-recorded against the new build; all other 458 tests are untouched.
Input/Brief/Argswere not modified. Suite is 506/506.