Ethernet shields, SPI and Macchina

This post will describe how to get Macchina talking with SPI shields, including Ethernet shields.

But first some Background:

When the Arduino Mega was introduced, for some reason, the SPI lines where in a different physical location than the Arduino UNO. This meant that several SPI-dependant shields were not compatible with both the Mega and the UNO without using some jumper wires.

MEGA SPI: 50 (MISO), 51 (MOSI), 52 (SCK), 53 (SS).

UNO SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK).

Our solution to get around this, and allow for more compatibility between the Macchina and shields, was to add some solder-jumpers to the Macchina board. Now one can easily swap the SPI lines depending on what sort of shield is attached.

Flash forward a few years and the SPI pins have not moved, BUT it seems as though the official solution to this was to use a down-ward facing 2X3 ICSP header to make connection to SPI pins on ALL Arduino boards.

While laying out Macchina, we moved the ISCP header to make room for all the extra automotive interface stuff. This alone would not be an issue, except for the fact that some new shields (the Arduino Ethernet Shield for example) ONLY has these SPI pins on the down-ward facing ISCP header and no where else. This is an issue, a known issue.

Work-arounds are as follows:

1. If using the Official Ethernet shield: Need to add jumper wires to make correct connections. There are many ways to accomplish this including this solution that connects wires from the ICSP header to the side headers. Some soldering required.

2. Is using SEEEDSTUDIO's Ethernet Shield: Need to re-route the SPI lines by using the easier-to-do-than-soldering-wires method shown here:

Side note: Both of these boards are sold at Radioshack (!?) for about $32.

3. If using the Sparkfun-branded Ethernet Shield: No modifications necessary since wires are going directly to the SPI pins on the side headers.

Regardless of which of these shields are used, the solder jumpers on the Macchina must be set as follows:

Once hardware modifications are done, plug the shield into the Macchina and get coding!

A good first test would be to try out is the built-in example called "WebServer" that comes with the standard Arduino IDE.

Lastly, a note regarding SPI:

The CAN interface also uses SPI to communicate with the microcontroller. While the hardware is set up correctly (SS (chip select) for the CAN controller is connected to a un-used pin on microcontroller, special care must be taken with the code to ensure communication between Ethernet Microcontroller and CANBUS Microcontroller is handled correctly.

Comments

I love seeing blog that understand the value of providing a quality resource for free.Your web log isn’t only useful but it is additionally really creative too.This post is really the best on this valuable topic. Iml Biscuit Container

Ethernet shields, SPI and Macchina are the best for us, and we can learn how to deal with the best ideas and use the services that are good and can deliver the best to us.  At the Sunshine Coast I saw people are using the services and getting what they want. 

Hmm it appears like your website ate my first comment (it was super long) so I guess I’ll just sum it up what I wrote and say, I’m thoroughly enjoying your blog. I too am an aspiring blog blogger but I’m still new to everything. Do you have any helpful hints for first-time blog writers? I’d definitely appreciate it. bandar togel online

Embrace the rich heritage of traditional fabrics with this khaddar 3-piece suit. Crafted from high-quality, breathable khaddar, the set includes a soft khaddar shirt adorned with intricate embroidery, matching trousers, and a striking dupatta that adds a pop of color to your look. Perfect for day-to-evening wear, this suit offers both warmth and comfort with a texture that drapes beautifully. Khaddar fabric in Pakistan

I simply couldn’t go away your website before suggesting that I actually enjoyed the standard information an individual provide on your visitors? Is gonna be back frequently in order to inspect new posts. wabet77

I think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article.Thank you because you have been willing to share information with us. we will always appreciate all you have done here because I know you are very concerned with our. deliverance Minister

This is my first time visit here. From the tons of comments on your articles,I guess I am not only one having all the enjoyment right here!I havent any word to appreciate this post.....Really i am impressed from this post....the person who create this post it was a great human..thanks for shared this with us.I know your expertise on this. I must say we should have an online discussion on this. Writing only comments will close the discussion straight away! And will restrict the benefits from this information.   titaniuminvest

Experience a leap in cooling technology with the Tesla Refrigerator, offering not just premium food preservation but intelligent temperature management. Powered by Tesla’s commitment to efficiency, this refrigerator keeps your groceries fresh longer, while its sleek design and innovative features add futuristic elegance to your kitchen. tesla refrigerator

Interesting topic for a blog. I have been searching the Internet for fun and came upon your website.This is really nice to read..informative post is very good to read..thanks a lot!I really loved reading your blog. It was very well authored and easy to undertand. Unlike additional blogs I have read which are really not tht good. I also found your posts very interesting. In fact after reading, I had to go show it to my friend and he ejoyed it as well!I learn some new stuff from it too, thanks for sharing your information. Ariana Grande Phone Number 2024

I think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article.Thank you because you have been willing to share information with us. we will always appreciate all you have done here because I know you are very concerned with our. fintechzoom.com

you are in reality a excellent webmaster. The website loading pace is incredible. It seems that you’re doing any distinctive trick. Also, The contents are masterpiece. you have performed a wonderful task on this subject! bhaddiehub

I think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article.Thank you because you have been willing to share information with us. we will always appreciate all you have done here because I know you are very concerned with our.   Union Square Residences

Wow i can say that this is another great article as expected of this blog.Bookmarked this site..We have sell some products of different custom boxes.I wanted to thank you for this excellent read!! I definitely loved every little bit of it. I have you bookmarked your site to check out the new stuff you post.SOUTH CAROLINA FAKE ID

We are really grateful for your blog post. You will find a lot of approaches after visiting your post. I was exactly searching for. Thanks for such post and please keep it up. Great work.Excellent article. Very interesting to read. I really love to read such a nice article. Thanks! keep rocking.    brae bond angel fortifier

I’ve been searching for some decent stuff on the subject and haven't had any luck up until this point, You just got a new biggest fan!..This is really nice to read..informative post is very good to read..thanks a lot! convert m to inches

This is my first time visit here. From the tons of comments on your articles,I guess I am not only one having all the enjoyment right here!Very efficiently written information. It will be beneficial to anybody who utilizes it, including me. Keep up the good work. For sure i will check out more posts. This site seems to get a good amount of visitors. Solar Generator For House

We are really grateful for your blog post. You will find a lot of approaches after visiting your post. I was exactly searching for. Thanks for such post and please keep it up. Great work.Awesome article, it was exceptionally helpful! I simply began in this and I'm becoming more acquainted with it better! Cheers, keep doing awesome! Off Grid Solar Panel Kits For Home

For those who want a discreet, smokeless way to enjoy nicotine, ALP Nicotine Pouches are the perfect choice. Available in a range of fresh and bold flavors, these pouches are designed to deliver a smooth nicotine experience without the mess and smoke associated with traditional cigarettes. The eco-friendly packaging makes it easy to feel good about your choice while enjoying your nicotine. alp pouch

Pages