LCD5110_BASIC library und SPI

Hey folks,

i did a projekt in the past were I used the LCD5110_Basic library. Now I want to add an SD card to this Projekt. Therefore I have to use SPI for SD and the LCD. Well, since the LCD5110_Basic library suports Software SPI I try to modify the library to get my LCD run on the SPI bus. Does someone of you know how to modify the lib? Or is there already a LCD5110_Basic library existing which suports hardware SPI? There are other librarys in the www but they use another print funktion. And I really don't want to change these hundreds of print commands in my sketch! LCD5110_Basic library downloades here: http://arduino.alhin.de/index.php?n=23

Thanks a lot for your help!

It is probably just a case of either editing the pin call in the library or changing the pin call in the code. All you need is display pin 4 to MOSI 11, 5 to CLK 13, and 2 to a pin not required by anything else for chip enable, particularly the SD. I use pin 7.

The standard Philips PCD8544 library is quite easily edited to do this, and any other pin call you want.

I would have thought you use lcd.print irrespective of the library you use, but a bulk search and replace would surely fix this problem anyway.

Thanks for your answer, but is that enough to change the pinnumbers? but whats about the SPI, how do the lcd library know to use SPI?

well, a search and replace funktion is not the problem, but in the LCD5110_Basic library the printfunktion implements the cursorfunktion for writing. It looks like this i.e.: print("test", CENTER, 2) how to replace that automaticly?

codeboy: Thanks for your answer, but is that enough to change the pinnumbers? but whats about the SPI, how do the lcd library know to use SPI?

I think you can use any pins but, if you use the standard SPI bus arrangement, it becomes an SPI device. This might help

http://ianlangelectronic.webeden.co.uk/#/lcd-module-0/4569058582

well, a search and replace funktion is not the problem, but in the LCD5110_Basic library the printfunktion implements the cursorfunktion for writing. It looks like this i.e.: print("test", CENTER, 2) how to replace that automaticly?

OK, maybe it's a bit more complicated than I thought..........