From 4e11af1da01eff2485ce54e2d77cad9ef5014ec8 Mon Sep 17 00:00:00 2001 From: Teo-CD Date: Fri, 15 Dec 2023 21:31:34 +0000 Subject: [PATCH] =?UTF-8?q?Arduino:=20Use=20400kHz=20clock=20for=20I=C2=B2?= =?UTF-8?q?C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 ! --- Arduino/ReceiveCart/ReceiveCart.ino | 1 + Arduino/SendCart/SendCart.ino | 1 + 2 files changed, 2 insertions(+) diff --git a/Arduino/ReceiveCart/ReceiveCart.ino b/Arduino/ReceiveCart/ReceiveCart.ino index b1a41d8..4534669 100644 --- a/Arduino/ReceiveCart/ReceiveCart.ino +++ b/Arduino/ReceiveCart/ReceiveCart.ino @@ -45,6 +45,7 @@ void setup() { Serial.begin(115200); pinMode(LED_BUILTIN, OUTPUT); Wire.begin(); + Wire.setClock(400000); } void loop() { diff --git a/Arduino/SendCart/SendCart.ino b/Arduino/SendCart/SendCart.ino index 54de478..6bb0292 100644 --- a/Arduino/SendCart/SendCart.ino +++ b/Arduino/SendCart/SendCart.ino @@ -33,6 +33,7 @@ void setup() { Serial.begin(115200); pinMode(LED_BUILTIN, OUTPUT); Wire.begin(); + Wire.setClock(400000); } /*