SPI connections

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

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 work Lahore Escorts

I think this is an informative post and it is very beneficial and knowledgeable. Therefore, I would like to thank you for the endeavors that you have made in writing this article. All the content is absolutely well-researched. Thanks... Lahore Call Girls

It is included in my habit that I often visit blogs in my free time, so after landing on your blog. I have thoroughly impressed with it and decided to take out some precious time to visit it again and again. Thanks. Call Girls in Karachi

Succeed! It could be one of the most useful blogs we have ever come across on the subject. Excellent info! I’m also an expert in this topic so I can understand your effort very well. Thanks for the huge help. Call Girls in Lahore

I am constantly surprised by the amount of information accessible on this subject. What you presented was well researched and well written to get your stand on this over to all your readers. Thanks a lot my dear. Islamabad Call girls

Excellent post. I was always checking this blog, and I’m impressed! Extremely useful info specially the last part, I care for such information a lot. I was exploring this particular info for a long time. Thanks to this blog my exploration has ended. Escorts in Pakistan

Fabulous post, you have denoted out some fantastic points, I likewise think this s a very wonderful website. I will visit again for more quality contents and also, recommend this site to all. Thanks. Karachi Escorts

This article is an appealing wealth of useful informative that is interesting and well-written. I commend your hard work on this and thank you for this information. I know it very well that if anyone visits your blog, then he/she will surely revisit it again. Escorts in Karachi

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. Escorts in Islamabad

Hey what a brilliant post I have come across and believe me I have been searching out for this similar kind of post for past a week and hardly came across this. Thank you very much and will look for more postings from you. Escort Pakistan

Great post but I was wondering if you could write a little more on this subject? I’d be very thankful if you could elaborate a little bit further. Thanks in advance! 먹튀폴리스

Pretty nice post. I just stumbled upon your weblog and wanted to say that I have really enjoyed browsing your blog posts. After all I’ll be subscribing to your feed and I hope you write again soon! 토토사이트

<a href="https://www.infobrez.com/payroll-software">payroll software</a>Payroll software, familiar as the payroll management system or payroll management software, is a solution that is used to organize the process of employee payments. Payroll Software helps the HR & Accounting Teams to manage and schedule <a href="https://www.infobrez.com/payroll-software">payroll software</a>payroll operations without human error and saves time. 

Attendance Management keeps track of your employee hours. It is the system you use to document the time your employees work and the time they take off. Attendance Management can be done by recording employee hours on paper, using spreadsheets, punching time cards, or using online attendance software for your company.https://www.infobrez.com/attendance-management-softwarehttps://www.infobrez.com/attendance-management-softwarehttps://www.infobrez.com/attendance-management-software   

Whenever I have some free time, I visit blogs to get some useful info. Today, I found your blog with the help of Google. Believe me; I found it one of the most informative blog. 먹튀검증

I think this is an informative post and it is very beneficial and knowledgeable. Therefore, I would like to thank you for the endeavors that you have made in writing this article. All the content is absolutely well-researched. Thanks... 먹튀폴리스

Thanks for an interesting blog. What else may I get that sort of info written in such a perfect approach? I have an undertaking that I am just now operating on, and I have been on the lookout for such info. 먹튀검증

This is my first time visit to your blog and I am very interested in the articles that you serve. Provide enough knowledge for me. Thank you for sharing useful and don't forget, keep sharing useful info: jenis grosir

Pretty good post. I have just stumbled upon your blog and enjoyed reading your blog posts very much. I am looking for new posts to get more precious info. Big thanks for the useful info. Rap contest

Pages