The amazing library created by TheCoolest runs very fast but the numbers on the screen are very small and since I don't see very well I would like to display larger numbers like display.setTextSize(2) on the Adafruit_PCD8544 and Adafruit_GFX libraries. Does anyone have any clues on how to do it using this amazing code?
I would not worry about "speed". The display is very small. It will never take long to draw.
Just use the regular Adafruit_PCD8544 library from Adafruit.
It uses Adafruit_GFX. Hence you can print the "system 5x7 font" in X1, X2, X3, ...
Or you can use the FreeFonts in the size that you like.
Most SPI displays can use regular HW_SPI (on hardware SPI pins) or bit-bang on random pins.
David.
Thanks for youy reply but I really want to use a fast library.
Go on. The PCD8544 LCD has a pretty slow response time.
Using the HW SPI constructor will be much faster than your eyes can see. And certainly faster than the LCD responds to.
I suspect that you are bit-bashing SPI on random pins i.e. using the SW SPI constructor.
Note that if you use the SW constructor on the HW pins you still get bit-bash.
I suggest that you try the HW constructor.
// Software SPI (slower updates, more flexible pin options):
// pin 7 - Serial clock out (SCLK)
// pin 6 - Serial data out (DIN)
// pin 5 - Data/Command select (D/C)
// pin 4 - LCD chip select (CS)
// pin 3 - LCD reset (RST)
//Adafruit_PCD8544 display = Adafruit_PCD8544(7, 6, 5, 4, 3);
// Hardware SPI (faster, but must use certain hardware pins):
// SCK is LCD serial clock (SCLK) - this is pin 13 on Arduino Uno
// MOSI is LCD DIN - this is pin 11 on an Arduino Uno
// pin 5 - Data/Command select (D/C)
// pin 4 - LCD chip select (CS)
// pin 3 - LCD reset (RST)
Adafruit_PCD8544 display = Adafruit_PCD8544(5, 4, 3);
// Note with hardware SPI MISO and SS pins aren't used but will still be read
// and written to during SPI transfer. Be careful sharing these pins!
I agree that speed is important on a 320x480 full colour display.
But I am sure that you will find that 84x48 monochrome is always going to be fast.
I could show you how to render big fonts with your 9-year lcd library that has non-standard text and graphics.
However you will be better served by a regular Adafruit_GFX style library (with HW SPI constructor)
And your programs will run on bigger monochrome displays as well as large colour displays (if you ever want to change displays).
David.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.