brainwash 12 Posted July 6, 2013 Share Posted July 6, 2013 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. Adafruit_PCD8544.zip Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.