Jump to content
Sign in to follow this  

Adafruit 5110/PCD8544 port

Recommended Posts

Since I haven't been able to find a library for the LCD 5110 that supports graphics as well I decided to port the arduino library. It turned out to be take much less time than I thought it would, considering my very limited C/C++ experience.


Most of the time was spent rewriting the fast software SPI routine:

inline void Adafruit_PCD8544::fastSPIwrite(uint8_t d) {
  for(uint8_t bit = 0x80; bit; bit >>= 1) {
ROM_GPIOPinWrite(mosiport, mosipinmask, d&bit ? mosipinmask : 0);
ROM_GPIOPinWrite(clkport, clkpinmask, clkpinmask);
ROM_GPIOPinWrite(clkport, clkpinmask, 0);
I haven't tested everything but the example (also included in the zip) works. There are still avr includes in the GFX libraries but it seems to work. Maybe someone can clean up and package a nice library.


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this