1
0
Fork 0
Commit graph

3 commits

Author SHA1 Message Date
a416173caa Arduino: Use readBytes for cart read
The Wire documentation only shows read() to get data from
the I²C stream.
However, Wire inherits from Stream, so it gets access to
all the same functions, like readBytes(), which can read
more than one character.

Replace the innermost loop of the cartridge load by
readBytes instead of calling read() in a loop.
2023-12-17 13:20:48 +00:00
9e5e55b2f1 Arduino: Use 400kHz clock for I²C
The EEPROM in the cartridges support 'Fast I²C' at 400kHz.
Testing it out, it seems to work fine despite the high pull-ups,
so update the Arduino code to enjoy the 4x speed-up !
2023-12-16 14:10:25 +00:00
f2c93296be Arduino: Add full Arduino code
This is the full working Arduino code, for writing and loading.

This shouldn not be used by students.
2023-12-16 14:01:21 +00:00