Pages: [1]   Go Down
Author Topic: ENC28J60 + AdaFruit Motor shield?  (Read 1562 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 2
Posts: 53
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi guys, for my project I need to run my NuElectronics ENC28J60-based ethernet shield, and the AdaFruit motor shield together, however it seems there are conflicts in their pin usage. From the information I have found (links below), it looks like they conflict on pin 12 (MISO) and pin 13 (MOSI). From what I have read these are I/O channels, but I don't know enough to figure if they can have mulitple devices on them as a bus, or if they are 1-to-1, or if I can move either shields' pins to use other pins on Arduino (obviously having to jumper the pins via breadboard or other means, cant keep them physically stacked). Can anyone shed some light on this? I'd really rather not have to use a second arduino and I2C just to get these two shields working in the same project!

Ethernet Shield ENC28J60 pins -- http://shieldlist.org/nuelectronics/ethernet
AdaFruit Motor Shield pins -- http://shieldlist.org/adafruit/motor
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 644
Posts: 50524
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The ethernet shield uses SPI, which operates on pins 11, 12, and 13. It also needs a chip select pin, for which pin 10 was chosen. You will not be able to use those pins for any other purpose, which means that that motor shield will not work.

There are other motor shields that do not use as many pins, or there are non-shield variations that do not use fixed pins. What, exactly, is the motor shield driving?
Logged

0
Offline Offline
Jr. Member
**
Karma: 2
Posts: 53
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi PaulS, good to see you "on the other side" here! I am driving two stepper motors with the motor shield. Is the problem specifically that they are both SPI devices, and therefore cannot be on one arduino, or just the pins that are in use? If it's just the pins, could I throw one of the shields on a breadboard, jumper it to unused D pins, then mod the library to use the new pins?
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 644
Posts: 50524
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Is the problem specifically that they are both SPI devices
The AdaFruit motor shield does not appear to be an SPI device. It just happens to use SPI pins.
Logged

0
Offline Offline
Jr. Member
**
Karma: 2
Posts: 53
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That being the case, it seems fair to assume there may be some hope in shifting the motor shields' pin usage and having the two play nice. As with most projects (I assume anyway), I intend to use my shields just for the prototyping phase, then build permanent boards later on.
Logged

0
Offline Offline
Newbie
*
Karma: 4
Posts: 42
Arduino rocks - Yeah Baby!!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The nuelectronics ethernet shield does not operate well with other SPI devices due to it not using a tri-state buffer for some (cant remember exactly which) lines.

There have been a number of hacks to replace the 74HCT08 with a tri-state buffer but this may not help the motor shield as it probably doesnt use the SPI bus as previously stated.

Cheers

Andy

Logged

0
Offline Offline
Jr. Member
**
Karma: 2
Posts: 53
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Does anyone have some leads on building a economical ATMega328-compatible ethernet chipset from readily-available parts? If I need to switch to a Wiznet based Ethernet solution that's fine, but either route, it needs to be reliable, and a chipset that can be replicated in a permanent custom board in the future, when I'm passed the prototyping phase.
Logged

Pages: [1]   Go Up
Jump to: