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 simply must tell you that you have written an excellent and unique article that I really enjoyed reading.  I’m fascinated by how well you laid out your material and presented your views.  Thank you. situs garuda303

I have you bookmarked your site to check out the new stuff you post.This is such a great resource that you are providing and you give it away for free.Great survey, I'm sure you're getting a great response.I’m going to read this. I’ll be sure to come back. thanks for sharing. and also This article gives the light in which we can observe the reality. this is very nice one and gives indepth information. thanks for this nice article...  bitcoin bank breaker test

I really like your article.  It’s evident that you have a lot knowledge on this topic.  Your points are well made and relatable.  Thanks for writing engaging and interesting material. go88

Can I just say what a relief to find someone who really is aware of what theyre speaking about on the internet. You undoubtedly know methods to carry a problem to gentle and make it important. Extra people must learn this and understand this aspect of the story. I cant imagine youre not more widespread because you positively have the gift. Olxtoto

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.Thank you because you have been willing to share information with us.  Sora

I simply must tell you that you have written an excellent and unique article that I really enjoyed reading.  I’m fascinated by how well you laid out your material and presented your views.  Thank you. UFABETเว็บตรงเดิมพันไม่มีขั้นต่ ============= You write very interesting articles which are very fun to read. ทางเข้า 98

Excellent read, I just passed this onto a friend who was doing a little research on that. And he actually bought me lunch since I found it for him smile So let me rephrase that: Thank you for lunch! qq

I discovered that this content was of great assistance to me. I am grateful to you. Your ability to continue creating articles of such a high quality is something I am quite hopeful about. fnaf unblocked

I appreciate everything you have added to my knowledge base.Admiring the time and effort you put into your blog and detailed information you offer.Thanks.I learn some new stuff from it too, thanks for sharing your information.Please continue this great work and I look forward to more of your awesome blog posts.Nice knowledge gaining article. This post is really the best on this valuable topic.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! Aluminium Bus Duct

I really like your article.  It’s evident that you have a lot knowledge on this topic.  Your points are well made and relatable.  Thanks for writing engaging and interesting material. myeg roadtax receipt ===============  This is my first time i visit here. I found so many entertaining stuff in your blog, especially its discussion. From the tons of comments on your posts, I guess I am not the only one having all the enjoyment here! Keep up the excellent work. suction up dildos

Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with extra information? It is extremely helpful for me.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 and I hope you post again soon. Big thanks for the useful info.  Stepper Motor For Camera

На нашем сайте вы сможете найти актуальный промокод 1xBet на сегодня. Поспешите и получите действующий промокод, который дает бонус до 32 500 рублей всем новым игрокам. Просто введите наш промокод в поле регистрации и получите свой приветственный бонус. Сегодняшний действующий промокод 1xBet предлагает 100% приветственный бонус до 130$ при первом депозите. Этот бонус можно использовать для ставок на спорт и киберспорт. Промокоды обычно представляют собой уникальные комбинации символов или слов, созданные для конкретной акции и не повторяющиеся в будущем. https://rg62.info/news/1xbet_promokod__1.html

There are a few interesting points at some point on this page but I don’t know if  these people center to heart. There is certainly some validity but I most certainly will take hold opinion until I take a look at it further. Excellent post , thanks so we want far more! Combined with FeedBurner in additionWhatsapp plus

Worried about a decaying window sill? Swiftly tackle the issue with expert window repair. Enhance your home's durability and visual appeal. Don't wait—call now! Wood window sill rot =============== A rotting window sill is more than cosmetic; it's a threat to your home. Seek skilled repair services to fortify and beautify your windows. Act now—secure your space! Commercial window repair

I’d like to visit your blog more often however recently it appears to be taking endlessly to come up. I go to from work, and our connection there is pretty good. Do you think the problem may very well be in your finish? middle calc

Thanks for your article. I would like to comment that the very first thing you will need to do is check if you really need repairing credit. To do that you simply must get your hands on a copy of your credit rating. That should never be difficult, considering that the government necessitates that you are allowed to get one cost-free copy of your real credit report yearly. You just have to check with the right people. You can either look at website for that Federal Trade Commission and also contact one of the major credit agencies directly. qq

Thank you for another informative website. Where else could I get that type of information written in such a perfect way? I have a project that I’m just now working on, and I’ve been on the look out for such information.tips and tricks saat travel

I recently noticed your website back i are generally looking through which on a daily basis. You’ve got a loads of information at this site so i actually like your look to the web a tad too. Maintain the best show results! escort batumi

Very informative post! There is a lot of information here that can help any business get started with a successful social networking campaign.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.  Electronic Smart Padlocks For Security

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.  bitcoineer official

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.Thank you because you have been willing to share information with us.  immediate momentum website

Thanks for creating this. I really feel as though I know so much more about the topic than I did before. You should continue this, Im sure most people would agree youve got a gift. cpa online

The internet can make it simplier and easier than at any time to acquire foods distribution providers.  Simply because they are on-line, they are easy for you to learn. You can shop for what you desire suitable from your unique personal computer. It is less complicated than actually to uncover food suppliers for Japanese cooking, this includes individuals that specialize in meals these kinds of as kombu. This kelp is harvested in Japan and is important for a lot of Japanese dishes. If you are arranging on cooking Japanese foods, you will want to be specified that you use the freshest ingredients.  Solar company

Pages