Skip to content

Conversation

@ZenoArrows
Copy link

@ZenoArrows ZenoArrows commented Apr 20, 2025

When the console is being turned on the data line is initially low because the console is powered off. This causes joybus-pio to incorrectly conclude that the first MSB bit is 0. The simple fix for this issue is to wait until the data line becomes high before entering the read loop.

However this doesn't work if the console is reset, since we are already in the loop by then. Thus for a complete fix we need to detect if the data line actually returns to a high value, if it doesn't then we should reset the loop by emptying the ISR and waiting for the data line to become high again.

I also included a trivial commit that includes a missing header in the examples.

@ZenoArrows ZenoArrows force-pushed the master branch 3 times, most recently from 16e44cc to 195539a Compare April 21, 2025 18:44
@ZenoArrows ZenoArrows changed the title joybus: Fix first bit being skipped due to invalid PIO state joybus: Fix first bit being skipped when console is being turned on Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant