Has anyone every used "USART in SPI mode" on the Arduino Mega 2560?

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:

  1. Has anyone every looked into this issue before?
  2. 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?
  3. 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).

USART is not SPI.
If you are careful, then SPI - Arduino Reference
it's hardware shiftOut () + shiftIn ()
Why shiftIn () for your display?

You can use software SPI (shiftOut ()) on any pins.
Best regards.

^ That is true but the Atmega datasheet actually specifies using the USART hardware in SPI mode

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

So why does that need independant SPI busses ?

The Mega 2560 is a single core processor.

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! :frowning:

Thank you all again!
Michael

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.