Tapatalk

RE: Nokia 5110 LCD connection with Whisper node AVR

RE: Nokia 5110 LCD connection with Whisper node AVR

5

PostDec 10, 2018#1

Hi there,
I am having issues displaying the results in Nokia 5110 LCD using Whisper node AVR as MCU. I used the FTDI breakout board 3.3V to successfully upload the code using Arduino platform. At this point, I have connected Pin D3,D4,D5,D6,D7 in the Whisper node MCU with the RST, CS, D/C, DIN and CLK in the Nokia 5110 LCD respectively. Also, Pin LED and VCC in the LCD is connected to 3.3 V in the MCU and GND of LCD to GND of MCU. Before this, I tried connecting the LCD pinouts with MCU pinouts following the pinout diagram but that didn't worked either. I downloaded the library for LCD from Adafruit and ran the program "pcdtest" from "File>Examples>Adafruit PCD8544 Nokia 5110 LCD library>pcdtest" using Arduino IDE 1.8.7. However, nothing is printed in the display.
I would be very grateful if you can help me solve this issue.

Regards,
Biraj

1885
1885

PostDec 11, 2018#2

Maybe try this other library:

https://github.com/olikraus/u8g2, try using the "PCD8544" driver, try like that:
U8G2_PCD8544_84X48_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ A1, /* dc=*/ A2, /* reset=*/ A3);

Connect the pins respectively and give it a go. You can always share the SPI pins, just need to use a difference CS for each device.

Here some video it working: 

Regards

5

PostDec 11, 2018#3

Thank you so very much. It's working now. I was having issue during compilation (segmentation fault) so I played around and used U8X8 instead of U8g2 and it worked with following code and pin definition. 

#include <Arduino.h>
#include <SPI.h>
#include <U8x8lib.h>
/* Constructor */
U8X8_PCD8544_84X48_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
/* u8x8.begin() is required and will sent the setup/init sequence to the display */
void setup(void)
{
  u8x8.begin();
}
void loop(void)
{
  u8x8.setFont(u8x8_font_chroma48medium8_r);
  u8x8.drawString(0,0,"Hello");
  u8x8.drawString(0,1,"World!");
  delay(1000);
}
pin_definition.JPG (36.56KiB)

PostDec 11, 2018#4

U8g2 is also working now using File>Examples>u8g2>full_buffer>HelloWorld.

Thanks,
Biraj