SOFTWARE.
With the advent of the Arduino DUE, even when Atmel has written some ASF examples for it, the LCD example remained confined only for the SAM3U and SAM3X based evaluation boards. Thus, my plan was to start porting the original LCD library and examples to Arduino Due under the Atmel Studio environment, and then complete the porting to the Arduino IDE. Why? Again, to stay close to the original application and to corroborate that it worked on the Due from the Atmel side.
Before enter with the porting, I think this is an opportune moment to explain one or two things about EBI/SMC controller. SAM3X8E's core: ARM-Cortex M3 is fitted with a 6 layer AHB bus (84MHz) as a bridge between the processor M3 and the peripherals. The EBI/SMC controller is in between and can connect I/O lines from the 4 PIO controllers via AHB to the core. In other words, the SMC guarantees high speed data processing, which is what we need for our LCD applications with DUE (videos/photos). It is even faster that using the SPI protocol.
Porting from SAM3X-EK (SAM3X8H) to Due (SAM3X8E) inside Atmel Studio 6.1 (AS61).
Caveat: You don't need (even if you can) to do the following steps. I will provide for you the .bin file at the end of this reply in case you want to test in advance the application by yourself.
I am using the SAM3X-EK ASF LCD example and HX8347A library contained in AS61.
Step 1: to compile the LCD example in the SAM3X-EK using SAM-ICE and AS61. Check
Step 2: to create a blank project for Arduino Due in AS61. Check
Step 3: to copy and fill (paste) the LCD example in the main.c file of the Arduino Due project. Check
Step 4: to compile the LCD example and fix all the configuration issues (errors) like missing files (mostly classes), headers, etc.. Check
Step 5: to modify the arduino_due_x.h (equivalent to the variant.h in Arduino 1.5.X IDE) and the init.c (equivalent to the variant.cpp in Arduino 1.5.X IDE) according to Due I/O capabilities. Check
Step 6: to compile the LCD example for Arduno Due in AS61. Check
Step 7: to load the .bin file via SAM-ICE (jtag) or bossac via (usb) to Arduino Due.
Step 8: to wire the LCD with Due as shown in my reply #1. Check
Now we should have the LCD TFT module connected to Arduino Due and showing the same screen as reply#1.
What's next? All the LCD ASF AS61 project (around 214 files/116 folders, 17.6 MB) should be reduced to the following files:
-LCD_DUE_EXAMPLE1.ino
-hx8347a.h
-hx8347a.c
-smc.h
-smc.c
-variant.c and variant.h modified (with EBI LCD pin definitions)
...and make it run in the Arduino IDE 1.5.X. Here is where I am now. Now it is time to stop but before, here attached the workable .bin file.
p
LCD_DUE_EXAMPLE1.bin (22.2 KB)