I'm looking at using the Arduino Mega 2560 on a project. I'd prefer to have at least two independent SPI ports since we're planning on using an LCD Touch Screen
Based on all my research, the ATmega has 1 SPI port but the 4 USART ports can be used in SPI mode.
Based on the attached table, those USART pins would be used for SPI pins which is great. However, the Arduino Mega doesn't breakout out any of the XCKn (XCK0 - PE2, XCK1 - PD5, XCK2 - PH2, and XCK3 - PJ2). This at a glance is very disappointing to say the least.
My questions are:
Has anyone every looked into this issue before?
Has anyone every used these USART pins in SPI mode before on the Arduino 2560 and if so, did you have to rework the board in any way to get access to the XCKn pins?
Is there any way to use these USART as SPI without the XCKn? Could a timer pin be used? (I doubt it but figured it'd be worth asking).
Though you can use UARTs in SPI mode XCKn signals are not routed out on a regular Arduino Mega. And there is no easy way to do it. I'd use a soft SPI for one channel.
mswanson514:
I'm looking at using the Arduino Mega 2560 on a project. I'd prefer to have at least two independent SPI ports since we're planning on using an LCD Touch Screen
Thank you all for the replies! We wanted to use on an independent bus because we want our LCD to not be bogged down by sharing that SPI with other devices so we could get the fastest refresh rates.
This more or less confirms what I thought since the XCKn pins aren't routed out from the Atmel Processor to any of the headers which is such a bummer!