Pages: [1]   Go Down
Author Topic: Remap SPI pins (MISO, MOSI, CS) – is it possible ?  (Read 93 times)
0 Members and 1 Guest are viewing this topic.
Germany
Offline Offline
Newbie
*
Karma: 0
Posts: 34
Let’s get dangerous !
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I looked a while, but couldn’t find a definitive answer:

Is it possible to remap the SPI pins (on a Mega in my case) 50, 51, 52 to some other pins, let’s say 10, 11, 12 ?

I know that there is the ICSP header too, but due to the spatial setup of my project I will not be able to use them either. The easiest solution for me would be to just remap SPI pins to another location.


Is there a way to achieve this?
Thanks!  smiley
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 514
Posts: 26255
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Add wires from 50,51,52 to 11,12,13 (check the order) - and then keep 11,12,13 as unused inputs.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Germany
Offline Offline
Newbie
*
Karma: 0
Posts: 34
Let’s get dangerous !
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You mean soldering wires on the back of the Arduino? Whoa, sounds dirty to me  smiley-mr-green.

But is it possible to remap or reassign these pins in software ? Like one can assign interrupts to any other pins like so with this ‘register and bit shift stuff’ ?
« Last Edit: Today at 05:30:58 pm by Darkwing » Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 514
Posts: 26255
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Only if you use software to bitbang the pins - slower than using the SPI hardware and the up to 8 MHz clock rate that the hardware offers.
SPI is nice, offers "drop & forget" transfer - and 2 directions at once!
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Pages: [1]   Go Up
Jump to: