Rei Vilo 695 Posted November 15, 2012 Share Posted November 15, 2012 Library link: Energia library for Nokia 5110 LCD Store link : Nokia 5110 LCD BoosterPack/Breakout PCB The Nokia 5110 LCD is on the right: kurGan, Vstrom1300, bluehash and 3 others 6 Quote Link to post Share on other sites
Rei Vilo 695 Posted November 17, 2012 Author Share Posted November 17, 2012 Better image of the 5110 display with normal and large fonts: meanpc 1 Quote Link to post Share on other sites
xv4y 46 Posted December 13, 2012 Share Posted December 13, 2012 You're a master. I have a project for a DDS signal generator using the LaunchPad, an AD9850 board and the 5110 display. My goal for today was to "try to talk" with the 5110 LCD. You saved me a lot of work! Thanks a lot. Yan. Quote Link to post Share on other sites
Rei Vilo 695 Posted December 13, 2012 Author Share Posted December 13, 2012 @Yannick You're welcome! Quote Link to post Share on other sites
Rei Vilo 695 Posted December 13, 2012 Author Share Posted December 13, 2012 I've included Bryan Schremp's work and updated the library. The library for the Nokia 5110 LCD now supports both LaunchPad and StellarPad. See commit 95c33da pending approval. Download it from http://github.com/energia/Energia/tree/master/examples/7.Display/LCD_5110 Quote Link to post Share on other sites
OzGrant 22 Posted December 21, 2012 Share Posted December 21, 2012 Rei Vilo, I must be slow, but can not see a zip tag to download your Lib. at Github. Grant Quote Link to post Share on other sites
cde 334 Posted December 21, 2012 Share Posted December 21, 2012 Ignore me, I have no idea what I'm talking about. Quote Link to post Share on other sites
Rei Vilo 695 Posted December 21, 2012 Author Share Posted December 21, 2012 Rei Vilo, I must be slow, but can not see a zip tag to download your Lib. at Github. Grant Either Quote Link to post Share on other sites
Rei Vilo 695 Posted January 13, 2013 Author Share Posted January 13, 2013 Here is a library for the Nokia 5110 display on Energia using hardware SPI. Speed is faster! Enjoy Distribution.zip xv4y, reaper7 and bluehash 3 Quote Link to post Share on other sites
Rei Vilo 695 Posted January 13, 2013 Author Share Posted January 13, 2013 #include "SPI.h" seems to be required instead of #include "spi.h" Find the updated library at https://github.com/energia/Energia/tree/master/examples/7.Display/LCD_5110_SPI Quote Link to post Share on other sites
reaper7 67 Posted January 14, 2013 Share Posted January 14, 2013 @Rei Vilo - two comments: 1. in example LCD_5110_SPI_main.ino for LM4F120H5QR (line 93)command SPI.begin(2); sets ssPin to 2(PB_5) but above is set to PA_7.Maybe this mean a spi bus number, but in this case we need set first:SPI.setModule(2);SPI.begin(PA_7); or SPI.begin(10); BTW - maybe we also don't need to set: pinMode(_pinChipSelect, OUTPUT); inside LCD_5110_SPI.cpp->void LCD_5110_SPI::begin()... because in SPI.cpp->void SPIClass::begin(uint8_t ssPin) is set to OUTPUT too... 2. in LCD_5110_SPI.cpp void LCD_5110_SPI::write(uint8_t dataCommand, uint8_t c) { digitalWrite(_pinDataCommand, dataCommand); digitalWrite(_pinChipSelect, LOW); SPI.transfer((char)c); digitalWrite(_pinChipSelect, HIGH); } I think it should look like: void LCD_5110_SPI::write(uint8_t dataCommand, uint8_t c) { digitalWrite(_pinDataCommand, dataCommand); SPI.transfer(_pinChipSelect, (char)c); } because procedure SPI.transfer automatically sets ssPin to LOW before send data andafter sets ssPin to HIGH (of course if You dont set transferMode to SPI_CONTINUE ) I have tested this solution and it works properly with other device (nRF24L01+) in the same spi bus Rei Vilo 1 Quote Link to post Share on other sites
Rei Vilo 695 Posted January 14, 2013 Author Share Posted January 14, 2013 Thank for the feed-back and the useful comments. 1. That's fixed now. Initialisation of _pinChipSelect is done line 72 of LCD_5110_SPI.cpp void LCD_5110_SPI::begin() { pinMode(_pinChipSelect, OUTPUT); ... } 2. I'm not sure to understand the comment. As far as I've understood, the master SPI selects the slave it wants to talk to through _pinChipSelect. SS is for slave select when SPI is in slave mode. Quote Link to post Share on other sites
reaper7 67 Posted January 14, 2013 Share Posted January 14, 2013 about 2: I think that the lines: CS_LOW and CS_HIGH are not needed when you replace SPI.transfer((char)c); by another call: SPI.transfer(_pinChipSelect, (char)c); which execute SPIClass::transfer(uint8_t ssPin, uint8_t data) -> SPIClass::transfer(uint8_t ssPin, uint8_t data, uint8_t transferMode) where lines: 169 sets CS 5110 to LOW and 176 sets CS 5110 back to HIGH sq7bti and Rei Vilo 2 Quote Link to post Share on other sites
Rei Vilo 695 Posted January 14, 2013 Author Share Posted January 14, 2013 Thanks for the explanation, it's clear now! meanpc 1 Quote Link to post Share on other sites
tw1ns 0 Posted March 23, 2013 Share Posted March 23, 2013 THX! 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.