Hello David. Thank you for your interest.
david_prentice:
I am intrigued. The photo shows an image on a 320x240 ILI9341 display.
The sketch implies that the image is being read from an SD card.
Yet there are no solder marks on the SD header terminals !!
How can the SD "work" ?
I am using an Arduino MKR Zero (not a clone). The MKR Zero has an SD card reader built into it, with its very own hardwired serial connections. You just declare the SDCARD_SS_PIN, and it works like magic. It is also 3V3 so there is no need for a logic shifter for the ILI9341. It has way more memory and claims to run at a faster speed. The downsides are that there is next to no documentation for it, and some of the libraries (see my first post for examples) do not run on the SAMD21 chip.
I suspect there are few out there who have experience with the MKR Zero.
david_prentice:
Please attach the actual file. (You will probably need to put it inside a ZIP for the Forum).
Life is much safer if you start with publicly available code. I guess that Bodmer has some RAW files on GitHub. There are definitely example RAW files in the UTFT distribution.
Personally, I prefer proper image files like .JPG, .BMP, .PNG, ...
These can be viewed on any PC.
I should have thought to attach the RAW image files. My apologies. Please see the ZIP file below.
The RAW files are 16-bit, 565 raw images. I used a file converter to make them from the original BMPs. Both of my photo viewer apps (I am running Windows 10), my higher end photo editor, and even Paint were able to open and display them (see attached).
I had been thinking that something was wrong with my application of the setAddrWindow command. I have tried several iterations of it:
// Set whole screen as writable window starting at top left
//myTft.setAddrWindow(int16_t(0), int16_t(0), int16_t(319), int16_t(239));
//myTft.setAddrWindow(int(0), int(0), int(319), int(239));
//myTft.setAddrWindow(0, 0, 319, 239);
myTft.setAddrWindow(0, 0, rawWidth-1, rawHeight-1);
//myTft.setAddrWindow(uint8_t(0), uint8_t(0), uint8_t(rawWidth-1), uint8_t(rawHeight-1));
//myTft.setAddrWindow(int16_t(0), int16_t(0), int16_t(rawWidth-1), int16_t(rawHeight-1));
None seems to make a difference.
I tried commenting out the initial fillScreen command before the first RAW image is drawn:
// Initialise the screen
myTft.begin();
myTft.setRotation(1);
//myTft.fillScreen(0x1393);
// Show RAW image
screenRAW("fa.raw");
delay(1000);
// Draw a black rectangle
myTft.fillRect(24, 68, 16, 124, 0x0000);
delay(1000);
// Show RAW image
screenRAW("ia.raw");
Interestingly, if I do that, the first RAW image doesn't draw at all, but the second one still tries to draw itself inside the black rectangle (see second image).
I have two questions to pursue. will I get the same results if I use just a screen rather than the ILI9341 shield you keenly observed? Will I get the same results if I ran this code on a NANO?
Again, thanks. I am deeply appreciative of any help.

screenRAW.zip (140 KB)
