Where is pin 78 on Due?

Hi, I found a sketch for testing a display MI0283QT9 with SPI interface. Originally it was written for Uno, Mega2560. The pin numbers for MISO, MOSI, SCK and CS had to be changed for Due.
The pin locations for SPI are the 2x3 SPI pins on the board.
To find out these pin numbers I inserted in setup() print statements for the defines MISO, MOSI, SCK and BOARD_SPI_DEFAULT_SS. Using the latter for chip select allows to use simpler function calls, e.g.

byte transfer(uint8_t _data, SPITransferMode _mode = SPI_LAST);

instead of

byte transfer(byte _pin, uint8_t _data, SPITransferMode _mode = SPI_LAST);

i.e. CS pin is not necessary as parameter.

Print out showed the following values:

MISO=74, MOSI=75, SCK=76, BOARD_SPI_DEFAULT_SS=78

Well, pins 74, 75, 76 obviously are the SPI pins on the board. But where is pin 78?
In the pin out drawings for the Due there is no pin 78.

THIS IS CIRCA 2012...

That is a good example why we ask for links to technical informaion. There are several possibilities, you have the wrong drawing, there was a mistook in the drawing. On your drawing look at A0.

I checked several Pinouts, also from Arduino page. None of them defines a digital pin 78. Therefore all libraries using SPI.h have to be adapted for Due to use only SPI function calls with CS_PIN as first parameter. SPI library allows calls with and without CS_PIN as first parameter.

In this forum I found a posting reporting that a Due only works successfully with SPI interface when pin52 is defined as CS . This is valid only when the code contains pinMode(CS, OUTPUT) and digitalWrite(CS,..) before SPI.begin() is called.

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