A fast PCD8544 library (Nokia 5110)

Thank you for the library! I was able to shave a lot of space from the binary sketch by using it.

Few observations:
a) the 'flicker' when clearing the screen is because in nonFB mode the screen is 'cleared' by drawing empty string that covers the screen and this which takes a while. I had to switch to FB mode, then it acts normal by using clear(0).
b) even if there was a lot of discussion about what are the correct values for vop / bias, I actually had to use 0x98 for vop and 0x12 to get the Nokia 5110 screen I have to look nice.
c) the screen was also acting funny (characters would sometimes jump around, random pixels would turn on/off, shearing effects) and the board would lock up after hours of running. Even if initially I thought it might be a power related issue, I found the culprit to be the SdFat library.

Initially I was using the Arduino provided library wrapper for SdFat (using a DIY shield based on a sdcard/microsd adapter) - and the card would init, but fail to write the file. Then I have switched to SdFat directly, where writing to the file worked. But screen was acting funny as the time went by ... and was getting worse and worse and it almost became unreadable with patches of pixels everywhere, etc. Convinced it is a power issue and waiting for an LM1117 3.3 to arrive, I decided to optimize the code even more and I ended up using tinyFAT. This one had problems also (meaning the lines appended to the file were changed, for example 20:57 would be written as 08:23; append sometimes started in a middle of the file!) so I switched to the Fat16 library.

Now everything runs smooth. Screen is rock stable, no jumpiness / shearing, no random pixels, and the values are correctly written to the sdcard.

Having a capacitor as recommended on the previous posts helped a bit, and also, not powering the backlight of the Nokia screen also helped a bit. Meaning it would act less funny when the thing was turned on, but as the time went by (hours), the effects were more and more noticeable. This made me think it might be a power issue - however, now after a day with Fat16 and everything is normal ... I guess there were few problems on the SPI line.

I have also modified the library to display characters 2 times the size (The equivalent of setTextSize(2) from the Adafruit library), by using a 10x16 array which I fill iterating through the 5x8 equivalent of the letter that has to be written. Still very fast :slight_smile: