by tef » Sat May 12, 2012 10:27 pm
That's a good point about the register select line. The other implication of this, at least with the current implementation of the Adafruit_HX8340B library, is that writing each data byte also requires an additional function call and return in addition to bit banging of the R/S bit. In the Adafruit_ST7735 library, the low-level data output is done with spiwrite(), which is inline code and thus optimized for speed. Also I note that none of the "Fast" library functions have been implemented for the HX8340B, so that things like fillScreen(), fillRect(), drawRect(), fillCircle(), drawFast*Line(), drawBitmap(), etc. are all going to be slower. I started to count the differences in the number of ATmega instructions for the two display drivers for the most common low-level I/O like drawPixel() [which typically gets called a bazillion times], but decided a better approach is just to time things empirically. Haven't done that yet though.