Help interfacing PCD8544 with Mega 256

Hi everyone,

I have just bought the LCD screen PCD8544 ( and I’m trying to make it working with an arduino mega 256. I’m a beginner in electronic and in the case of an arduino mega 256 I haven’t found an example with the PCD8544.
I’m looking for some help in order to make the right connection for the PIN 3 SCE, 4 RST, 5 D/C, 6 DN (MOSI), 7 SCLK.
I took a look on the datasheet but it’s not very clear at all for me yet. I’m here to learn so if someone wants to help me … Thank you.

Did you follow the manufacturer's link to the 'Arduino Example'? Be aware that you may have to change some pin numbers to use the example program with your Mega.


I took a look on the arduino example, but it doesn’t work on the fly, so i think i have to change the pin because if i’m not wrong, the lcd use SPI and SPI on mega is
50 : MISO
51 : MOSI
52 : SCLK
53 : SS

So I think in my case I should I have this :
LCD | Arduino
D/C 53
DN (MOSI) 51

But I dont really understand the meaning of SCE, is it corresponding to something in SPI, is it the MISO? And where should i link the RST ? Can you also confirm than SS and D/C are the same thing?
Thank for your help.


RST: The reset pin. This must be hold low for some time during power up. This could be done by some external logic, but it could be controlled by the Arduino also.

D/C: This is the Data / Command selection line, also known as A0 address line. Please do not confuse this with the Slave Select signal

SCE: The enable line, which is the one which should be connected to the Slave Select pin.

I am currently working on a new graphics library, which also supports your display. You could download u8glib from here: Google Code Archive - Long-term storage for Google Code Project Hosting.
Unzip the latest beta into the libraries folder and (re)start the Arduino IDE. You should be able to see the examples.

In the examples, uncomment the following line:

U8GLIB_PCD8544 u8g(13, 11, 10, 9, 8 ); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9, Reset = 8

This constructor will setup software SPI, so you could connect your display to any available pins. Just provide your pin numbers to the constructor. The pin numbers need to be in the following order:
U8GLIB_PCD8544(sclk, dn, sce, d_c , rst)
where sclk, dn, sce, d_c , rst must be replaced by the actual pin numbers.


Thank a lot for your explanation, I'll try this tonight and let you know.

Finally It works8)

This the pin I used :
SCK 52
CS 53
AO 9
Reset 8

It worked well with your library but the Hello World is too big with your font to be displayed in my screen but anyway it works.
The example on the arduino webpage doesn't work I don't know why.
I also try this lib > Google Code Archive - Long-term storage for Google Code Project Hosting. and it works.

Thanks again for your help.

U8glib has a huge number of fonts included. Just use a smaller font, e.g. u8g_font_6x10.
Or use another small one from here: Google Code Archive - Long-term storage for Google Code Project Hosting.