-
Notifications
You must be signed in to change notification settings - Fork 34
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
Problem with servo's #21
Comments
I am using an Arduino Pro Mini (5V) on 16 MHz. |
Yes, it does interfere. It is the same issue as issue #5 The Servo library uses one timer with one interrupt. In the interrupt routine the PWM signals are written to the pins. To do that, the interrupt must run at a high rate. The SoftwareWire library reads a register, changes a bit, and writes the register back. That is not safe. The OneWire/OneWire.cpp library uses Can you use a different port to avoid it? |
Thanks you for the quick response. Regards, Willem |
It is not often that one uses all 6 PWM ports. For this design it was necessary. |
Hi, I am a happy user of your library. Yesterday I ran into a problem however.
I was using a software I2C on pins D12 (SDA) en D13 (SCL). This works fine.
When I attached a group of 6 servo's (pin D3-D5-D6-D9-D10-D11)) to the controller the problem occurred. The servo's on D9, D10 and D11) connected to PortB (same Port as SDA-D12 and SCL-D13) these servo's started oscillating. This also happens when the servo-objects are not written to.
When I moved the software I2C to PortC (A0-SDA and A1-SCL) the problem was gone.
Does the timing of SoftwareWire interfere with the servo timing?
Kind Regards, Willem Braat (Netherlands)
The text was updated successfully, but these errors were encountered: