-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Arduino DUE - slow communication rate using Wire1 with Adafruit Motor Shield V2 #2669
Comments
@HanaJin did you make any progress on this? Unfortunately, I don't have access to the shield, but tried a Wire <-> Wire1 connection, connecting SCL0 to SCL1, SDA0 to SDA1, on my Due with the following sketch based on yours:
It's reporting a time used of 12 or 13ms, so not really seeing any timing issues with Wire1 on the Due now. @ladyada would someone from Adafruit have time to try out @HanaJin's sketch with the shield and a Due:
|
ok dont have this handy but off top of heade - its probably not i2c but rather the delayMicroseconds - is that known good on the Due? does it 'round up'? |
delayMicroseconds was fixed quite some time ago. Originally it was way off. I remember, because it was a lot of trouble for people using OneWire, which I maintain. I believe it was fixed by borrowing Teensy 3.0's code. :) |
Perhaps the slowness is in Serial? It got transmit buffering only very recently. I recommend testing this with the latest hourly build. (which really should be common sense to do before filing any bug report with any open source project...) |
@ladyada @PaulStoffregen thanks for the info! I was testing with the latest SAM core from Github, I think this issue can be closed, but it would be great to confirm with the real shield. From @HanaJin's post on the Adafruit forum, they were seeing a delay of 7 - 8ms on the Uno and ~2500 - 3300ms on the Due. This was back in Nov 2013. |
@sandeepmistry, can you share the delay number seen with the lastest SAM core? |
@HanaJin thanks for the update. Unfortunately I don't have a motor shield to test the Due with, however when I run the first sketch from #2669 (comment) (with the Wire1 connected to Wire port on the same Due) I get around 12 - 13 ms. I was using version 1.0.1 of the Adafruit Motor Shield V2 library installed from the Library Manager, with the Due connected to the Programming Port on my Mac. With a 1.6.6 hourly build from today with the 1.6.4 of the Arduino SAM Boards package, also get 13ms for the same sketch. |
This issue was moved to arduino/ArduinoCore-sam#23 |
I am using the Adafruit Motor Shield V2 library to control stepper motors. Their source code uses I2C communication under the hood to control the shield. The library uses Wire on Uno and Wire1 on Due, but both have the same default I2C bus speed. An important fact is that this is THE only difference between Uno and Due as far as the 3P library source code is concerned.
However, the same command in the library is taking a lot more (hundreds or thousands times) time on Due than Uno.
I have originally posted this question to Adafruit and am recommended by Adafruit to ask here. The original post is here
https://forums.adafruit.com/viewtopic.php?f=31&t=68292&p=346159#p346159
Is there any know issue for Wire1 on Due? Thanks for any help.
The text was updated successfully, but these errors were encountered: