-
-
Notifications
You must be signed in to change notification settings - Fork 723
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alternate SERCOM I2C Not Working On Pins PA08 and PA09 (4 and 3) #711
Comments
Works for me. Problems could be init in the library I had a lot of issues with external libraries if != Wire'0', Try manualy, this works: `#include <arduino.h> TwoWire Wire1(&sercom2, // &PERIPH_WIRE void setup() { // Init Wire1 Serial1.begin(115200); void loop() { Wire1.beginTransmission(0x40); Wire1.write(0b101010); // Sends value byte delay(500); |
Since I posted this, I’ve got it working. Thanks for the help.
…On Mon, May 20, 2024 at 9:06 PM tse ***@***.***> wrote:
Works for me. Problems could be init in the library I had a lot of issues
with external libraries if != Wire'0',
If the library tries to init the Wire remove the line (.begin) and add it
manually in your setup.
Try manualy, this works:
`#include <arduino.h>
#include "wiring_private.h" // for pinPeripheral() function
#include <Wire.h>
TwoWire Wire1(&sercom2, // &PERIPH_WIRE
4, // PIN_WIRE_SDA
3); // PIN_WIRE_SCL
void setup() {
// Init Wire1
Wire1.begin();
Wire1.setClock(100000);
pinPeripheral(4, PIO_SERCOM_ALT);
pinPeripheral(3, PIO_SERCOM_ALT);
Serial1.begin(115200);
}
void loop() {
Wire1.beginTransmission(0x40);
Wire1.write(0b101010); // Sends value byte
Wire1.endTransmission(); // Stop transmitting
delay(500);
}
`
(set the parameters according to your i2c chip connected)
—
Reply to this email directly, view it on GitHub
<#711 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BBIOT7A4OPSUBFTENMY57VLZDLXANAVCNFSM6AAAAAA6GMLEM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRRHEYDKMJZGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I2C is not working using PA08 and PA09 on the ATSAMD21G18A-AU with an Arduino Zero bootloader on a custom PCB.
-Tried Modified I2C Scanner
-Normal I2C on PA22 and PA23 still work
The text was updated successfully, but these errors were encountered: