Arduino Due step pins #175
-
Hi. In your project documentation step pins for DUE are: "This can be one of each group of pins: 34/67/74/35, 17/36/72/37/42, 40/64/69/41, 9, 8/44, 7/45, 6". Is there a source for mapping these groups to physical board pins? I was impressed by your library running on MEGA, but this pin information for DUE confused me. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hi, I am not familiar with the SAM Due port. @clazarowitz is the expert. Perhaps this link helps: (#140 (comment)) |
Beta Was this translation helpful? Give feedback.
-
The due is far more flexible than the mega. Onboard “peripherals” can be mapped all over the place, but there are limits. It’s not totally programmable, so you can’t just pick an arbitrary pin to connect the pwm peripheral to. You also can only connect a channel of the pwm peripheral to one pin (I think. Even if you can map the output to multiple pins though, that would just generate identical stepper signals on the pins, not allow more steppers to be used) I’ve stalled a bit on my main project for this working out the “throttle position sensor”. I’ve gone through a couple of iterations with no satisfactory performance. I’m on version 4, and just barely sent out some part designs to oshcut for steel laser cutting, bending, and powder coating to make a new mount for it (and all of the electronics while I was at it!). The new design feels like overkill, so maybe it will actually work, and I’ll get back to the stepper portion of the project! The bottom line is it has been a while since I looked at the data sheet, or even turned on my higher power computer for software development. (I like having a few 30” 4k monitors for software development! I got spoiled at work! :D ) but, going from flawed human memory, I believe the “groups” are where individual pwm channels can be mapped. So any pin from any group is usable, but two pins from the same group are not usable. I’ll get out the data sheet again and have a look. Maybe finally post some cleanup code too. Maybe even switch the interrupts to the falling edge to kill the delays and maybe get better performance. It’s been too long already :) |
Beta Was this translation helpful? Give feedback.
-
Thank you very much for the response! My main takeaway from these messages is that only one pin from the specified group can be used for stepping. After I test my DUE setup, I will post what pin combinations work best for 3 axis setup. Thanks again. |
Beta Was this translation helpful? Give feedback.
The due is far more flexible than the mega. Onboard “peripherals” can be mapped all over the place, but there are limits. It’s not totally programmable, so you can’t just pick an arbitrary pin to connect the pwm peripheral to. You also can only connect a channel of the pwm peripheral to one pin (I think. Even if you can map the output to multiple pins though, that would just generate identical stepper signals on the pins, not allow more steppers to be used)
I’ve stalled a bit on my main project for this working out the “throttle position sensor”. I’ve gone through a couple of iterations with no satisfactory performance. I’m on version 4, and just barely sent out some part designs to oshcu…