Why? As in why do you think you need to design something?
A shield for an LCD. Due and Mega2560 compatibility. One is 3V3 and the other is 5V. So the SPI pins are in different places. That’s not exactly a show stopper. Have you ever seen the make-a-jumper with a solder bridge on pc board pad designs? Or those little, neat header pins on 0.1 inch centers that you plug shorting jumpers on to?
Actually, while the Mega does have SPI pins on digital pins 50 something, those pins are also on the ICSP header. That header is in the same location on the Due. I feel that the ICSP and the D5x pins on the Mega are actually duplicate pins, while the Due doesn't run SPI to those D5x pins, because it has enough other IO lines to fill those spots.
I don’t know, maybe you’re completely new to electronics. But, I do know that what you’re trying to design has already been done. Countless times. For next to nothing in cost. If you don’t want to buy somebody else’s product, at least study the schematic and pictures and learn from it. After all, why re-invent the wheel? That’s quite pointless. Of course if this is being done as a pure learning experience and you want to learn KiCad or whatever, then good on ‘ya, carry on.
Pretty much new to it all. Apart from making a variable DC PSU in yr 12 physics (oh so long ago!) and being generally technical. I have two reasons for why:
1) I just gotta know how to do it! Use IOREF as a flag for which power level to supply in any particular circuit. This is a pretty straight forward circuit, and I think makes it simple to learn.
2) There are heaps of pre-existing shields out there, I agree. I have poured over many circuits to see how it's done. None of them use IOREF to make that decision. Of course, this can be a big, neon-red, flashing sign that reads "there's no need!". Why is there no need? Probably because you use level shifters which are 5v tolerant, and the 5v MCU boards see 3.3 as high, so it just works. But I wanna do it! :-D
But, see below, and you will understand the real, unavoidable reason WHY.
Here’s a shield that works with the Due, the Mega2560 and just about anything else Arduino that has the Uno form factor, interfaces with the dead common ILI9341 controller on the other end of a 40 pin ribbon and costs a whopping $4.23 US plus shipping. It just leaves me saying “why?” when I seeing people struggling to design something that already exists.
There are other designs, for other display controllers on this website:
https://www.buydisplay.com/arduino-shield-for-tft-lcd-with-ili9341-controller-and-arduino-due-mega-uno
I have seen and looked at the schematic for this one and many others. They don't use IOREF at all.
The second failing point of this shield is: it's made for "Arduino LCD Modules" which is a dumb idea, but it's one that exists. By Arduino LCD modules, I mean LCD modules which have a common pinout with every other LCD module aimed at the Arduino market. These pretty much have 32-pin or 40-pin headers and always have the data and command/signal pins in exactly the same place... which you would kind of expect, since they're interested in selling their ware to everyone with an Arduino.
On the other hand, I purchase my LCD module based on the capabilities of the display, not what pinout it had... because I was naive about these differences. The board I bought has a 34-pin header, and is marketed to the STM32 crowd, following the common pinout used on the common STM32 boards, possibly even set my ST themselves for their evaluation kits.
I did buy an LCD shield for Arduino Due:
CTE v1.04 for Arduino Due. It's a really nice shield. Unfortunately, pointless for this particular LCD module.
I thought I had read somewhere that the 34-pin modules, could plug into a 32-pin shield and depending on whether you want to use SPI or I2C you simply have one end or the other past the end of the shield header. So I bought this shield, as it had both 32-pin and 40-pin, and I could use other LCD modules with it in the future. Stupid me.
I know of ONE TFT LCD shield made for Arduino Mega 2560 and known to work with this LCD module. It's called "TFT LCD Mega Shield v3.0".
No one sells them that I can find. Everyone I can find are selling the v2.2 board which is yet another 40-pin shield. There are pages out there listing the v3.0 shield, but they say the product is discontinued. I've nagged about 45 sellers on AliExpress to try to find it. They're no help. Almost invariably they think the v2.2 is the same board.
And Oh My Gosh! Trying to find an image for you... I just found this:
Aus Electronics Direct - LCD and shield kit.I wonder if they sell the shield separately?