I've seen people say they can write pixels out to a TFT display faster using SPI than 16 bit parallel. This sounds incredulous to me.
Is it because, by the time I've output both bytes, set the write pin low, then back high, SPI has finished sending the 2 bytes and is waiting impatiently for all this other bit twiddling to finish?
My 16 bit code:
LCDDataHighPort.OUT = dat>>8; LCDDataLowPort.OUT = dat & 255 ; LCDWRPort.OUTCLR = 1<<LCDWRPin; LCDWRPort.OUTSET = 1<<LCDWRPin;
I'm using xMega, so I can set or clear a bit with one instruction rather than having to read the port, set the bit and write it back out.
What would the appropriate SPI code look like? Perhaps:
while(!(SPIC.STATUS & (1<<7))); SPIC.DATA = data>>8 ; while(!(SPIC.STATUS & (1<<7))); SPIC.DATA = data & 0xff;
Perhaps, if there's other code in the output loop, I could do some of it between the to SPIC.DATA outputs while the first byte is being sent?
So, who made up the list of "Application Tags?" None of them seem to have any relation to the subject.