Nokia 5110/3310 w/ CS tied to ground - library question

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
hutchfx
 
Posts: 8
Joined: Fri Aug 14, 2009 4:10 am

Nokia 5110/3310 w/ CS tied to ground - library question

Post by hutchfx »

I'm using the Nokia 5110/3310 with the chip select pin tied to ground, as instructed in the "Wiring (fewer pins)" tutorial. I've installed the Adafruit-PCD8544 and Adafruit_GFX libraries, and modified the example code to reflect the pins I'm using for the display:

Code: Select all

// pin 5 - Serial clock out (SCLK)
// pin 4 - Serial data out (DIN)
// pin 7 - Data/Command select (D/C)
// pin none, put in 10 to make it work - LCD chip select (CS)
// pin 6 - LCD reset (RST)
Adafruit_PCD8544 display = Adafruit_PCD8544(5, 4, 7, 10, 6);
Everything works fine, as long as there is a pin number in the 4th parameter for the chip select pin, but I don't need to toggle the chip select as it is tied to ground. Leaving the parameter blank generates a compile error. What can I put in that parameter that doesn't eat up an i/o pin? I'm reluctant to experiment with values that are out of range.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Nokia 5110/3310 w/ CS tied to ground - library question

Post by adafruit_support_rick »

There is an overload of the constructor that takes 4 arguments - you shouldn't be getting any errors. Perhaps you're not calling it correctly? It should look like this:

Code: Select all

Adafruit_PCD8544 display = Adafruit_PCD8544(5, 4, 7, 6);

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”