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

You can definitely see your skills within the work you write. The arena hopes for more passionate writers like you who are not afraid to say how they believe. All the time follow your heart. Adipatislot

Nice post. I discover some thing very complicated on diverse blogs everyday. It will always be stimulating to study content from other writers and rehearse something there. I’d want to use some while using content on my blog regardless of whether you don’t mind. Natually I’ll give you a link in your internet blog. Thanks for sharing. Dextools Trending Hot Pairs

After study a handful of the content on your web site now, and that i really like your way of blogging. I bookmarked it to my bookmark website list and will also be checking back soon. Pls look at my internet site too and told me what you think. Counseling

I’m impressed, I have to admit. Truly rarely do I encounter a weblog that’s both educative and entertaining, and let me tell you, you might have hit the nail on the head. Your thought is outstanding; the thing is something inadequate individuals are speaking intelligently about. We are happy we found this at my seek out some thing in regards to this. goagames

 It's great to see workarounds provided for compatibility issues, especially with shields like the Arduino Ethernet Shield. The step-by-step instructions and visual aids make it easier for users to understand and implement the necessary modifications.

Great job for publishing such a beneficial web site. Your web log isn’t only useful but it is additionally really creative too.Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed   Emerald of Katong

Wow i can say that this is another great article as expected of this blog.Bookmarked this site..You there, this is really good post here. Thanks for taking the time to post such valuable information. Quality content is what always gets the visitors coming.I definitely enjoying every little bit of it. It is a great website and nice share. I want to thank you. Good job! You guys do a great blog, and have some great contents. Keep up the good work. Polyurethane Foam Manufacturing Process

I do agree with all of the ideas you have presented in your post. They’re very convincing and will certainly work. Still, the posts are too short for starters. Could you please extend them a little from next time? Thanks for the post. untung138

I located your own weblog on google and check several of the earlier articles. Protect in the superb run. I just additional up your Feed to my personal Windows live messenger Information Reader. Searching for toward reading through additional from you afterwards! house buying/selling

I learn some new stuff from it too, thanks for sharing your information.Interesting topic for a blog. I have been searching the Internet for fun and came upon your website. Fabulous post. Thanks a ton for sharing your knowledge! It is great to see that some people still put in an effort into managing their websites. I'll be sure to check back again real soon. Domestic Water Treatment

Just desire to say your article is as amazing. The clearness in your post is just great and i can assume you’re an expert on this subject. Fine with your permission let me to grab your RSS feed to keep updated with forthcoming post. Thanks a million and please keep up the gratifying work. Oral b electric toothbrush Wholesale

I’ve been exploring for a bit for any high quality articles or blog posts on this sort of area . Exploring in Yahoo I at last stumbled upon this site. Reading this info So i’m satisfied to convey that I’ve an incredibly good uncanny feeling I came upon just what I needed. I most surely will make sure to don’t overlook this website and give it a look regularly. ETF Ethereum

After study many of the websites for your website now, and I genuinely much like your technique for blogging. I bookmarked it to my bookmark website list and you will be checking back soon. Pls consider my web site likewise and let me know what you consider. iphone se 2022

Fantastic job here. I really enjoyed what you had to say. Keep heading because you surely bring a new voice to this subject. Not many people would say what youve said and still make it interesting. Well, at least Im interested. Cant wait to see more of this from you. alexistogel

After study many of the websites for your website now, and I genuinely much like your technique for blogging. I bookmarked it to my bookmark website list and you will be checking back soon. Pls consider my web site likewise and let me know what you consider. Mini Dachshund Puppies for Sale

I love seeing blog that understand the value of providing a quality resource for free.This is my first time i visit here. I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here keep up the good workNice post! This is a very nice blog that I will definitively come back to more times this year! Thanks for informative post.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. 길동출장안마

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!Yes i am totally agreed with this article and i just want say that this article is very nice and very informative article.I will make sure to be reading your blog more. You made a good point but I can't help but wonder, what about the other side? !!!!!!Thanks 목동출장

I love seeing blog that understand the value of providing a quality resource for free.I can see that you are an expert at your field! I am launching a website soon, and your information will be very useful for me.. Thanks for all your help and wishing you all the success in your business.   white black vape battery

Wow! Such an amazing and helpful post this is. I really really love it. It's so good and so awesome. I am just amazed. I hope that you continue to do your work like this in the future alsoReally i am impressed from this post....the person who create this post it was a great human. lucky crush

I ran into this page on accident, surprisingly, this is a amazing website. The site owner has done a great job writing/collecting articles to post, the info here is really insightful. Now i am going to bookmark this internet site so that I can revisit in the future. gutter guards

An fascinating discussion is value comment. I feel that you must write extra on this matter, it may not be a taboo topic but generally individuals are not enough to speak on such topics. To the next. Cheers slot

Yes i am totally agreed with this article and i just want say that this article is very nice and very informative article.I will make sure to be reading your blog more. You made a good point but I can't help but wonder, what about the other side? !!!!!!ThanksThank you because you have been willing to share information with us.    Table Lamp Led

Hey – good weblog, simply wanting around some blogs, seems a reasonably nice platform You Are using. I’m currently using Drupal for a couple of of my websites however seeking to change one among them over to a platform very a lot the identical to yours as a trial run. Anything particularly you’d advocate about it? slot cuan

Youre so cool! I dont suppose Ive read anything this way just before. So nice to get somebody with many original ideas on this subject. realy i appreciate you for starting this up. this website is one thing that is needed online, someone with some originality. valuable project for bringing something new for the internet! LIGAMANSION2

Aw, i thought this was a very good post. In thought I must set up writing like that additionally – taking time and actual effort to generate a excellent article… but so what can I say… I procrastinate alot and also by no means often get something carried out. Teacup Yorkie Near Me

An interesting dialogue is price comment. I feel that you should write extra on this topic, it might not be a taboo subject but generally individuals are not sufficient to talk on such topics. To the next. Cheers Seasonal Betting

Pages