LCD Nokia 5110 + sistem Arduino

[ [ images, codes & links ] ]

The Nokia 5110 display has long been an Arduino Hobbyist favorite and a search of the internet will show that there are tons of different ways to drive this device.

There are a few varieties of this module are out there.   Mine are labeled as you see below.   Others should work just fine with this tutorial if you map your pins correctly.

Remember,  VCC is 3.3 Volts.   The LIGHT Control can use pulse width modulation through a 330 ohm resistor.

https://sunupradana.info/tkr/wp-content/uploads/2017/07/Nokia-5110-Pinouts.png

Gambar 1.

 

~Arduino Nokia 5110 with U8GLIB Tutorial

 

LCD Specifications

  • Controller: PCD8544
  • Supply: 2.7V to 3.3V
  • Interface levels: 2.7V to 5V
  • Backlight Colour: Blue
  • Backlight supply: 3.3V Max
  • Module size: W 43.6mm x H 43.1mm
  • Working current: < 200uA (Backlight off)

Notice that the module only needs 3.3v from the Arduino. More information can be found on the Datasheet located here.

nokiaGambar 2. [sumber]

lcdGambar 3. [sumber]

~hackshed.co.uk

Koneksi pada Gambar 3 hanya contoh, pin pada Arduino dapat diatur sesuai keperluan dan dukungan pustaka.

Gambar 4.

 

Untuk penggunaan LCD Nokia 5110, salah satu pustaka yang bisa dipergunakan adalah u8glib (atau versi yang lebih baru u8g2). Sebagai contoh untuk uji coba, dapat diikuti kode program dari: henrysbench.capnfatz.com berikut:

// Henry's Bench
// Arduino Nokia 5110 U8Glib Tutorial


#include "U8glib.h"

 

#define backlight 11
 
//Delcare the display and assign the pins
 
//U8GLIB_PCD8544 u8g(8, 4, 7, 5, 6);  // CLK=8, DIN=4, CE=7, DC=5, RST=6
 
 
U8GLIB_PCD8544 u8g(8, 4, 7, 5, 6);  // CLK=8, DIN=4, CE=7, DC=5, RST=6

 
void draw() {
 
  u8g.setFont(u8g_font_profont11);  // select font
  u8g.drawStr(0, 15, "Nokia 5110..");  // put string of display at position X, Y
  u8g.drawStr(29, 35, "HELLO!!!!");
  
  
}
 
void setup() 
{
  // Set Backlight Intensity
  // 0 is Fully bright
  // 255 is off
  analogWrite(backlight, 20);
  //
  // Enter the U8Glib Picture Loop
  //
  
}
 
void loop() 
{ 
 u8g.firstPage(); 
  do 
  {
    draw();
  } while( u8g.nextPage() ); 
  
}

Salah satu pustaka/library yang umum dipergunakan untuk LCD Nokia 5110 adalah pustaka  yang dikeluarkan oleh Adafruit. Terdapat dua bagian pustaka untuk lcd ini, satu adalah untuk driver hardware dan satu untuk pustaka grafik.

Urutan pin LCD 5110 pada produk Adafruit bisa jadi tidak sama dengan urutan pin LCD 5110 yang bisa dibeli di pasaran lokal (impor dari China). Meskipun begitu, pustaka dapat dipergunakan dan berfungsi secara normal.

 

Testing

You can find our Nokia Display Arduino library on github. To install it, click this button to download the compressed ZIP file then install it. This guide will help you with the install process if you have never installed an Arduino library.

Then you’ll have to do the same for the Adafruit GFX Graphics core library, available from github. Click the button to download it. Then install Adafruit_GFX just like the library you’ve done except this time name it Adafruit_GFX, etc.

Restart the Arduino software. You should see a new example folder called Adafruit_PCD8544 and inside, an example called pcdtest. Open up that sketch and upload it to your Arduino. You should see the example test sequence.

Graphics Library

We have a ready to go basic graphics library that has primitives for bitmaps, shapes and text. You can probably do everything you want using it. Because of the way the display works we need to buffer the entire display in ram which is 84×48 bits (504 bytes). However, screen updates are very fast.

For more details about the Adafruit GFX library, please visit http://learn.adafruit.com/adafruit-gfx-graphics-library – it supports lines, rectangles, roundrects, circles, text of different sizes etc.

Note that since this display is MONOCHROMATIC it only supports two colors: BLACK or WHITE. BLACK is a displayed dot and WHITE is for erasing pixels

Dont forget, after drawing anything to the screen, call display() to write it out to the LCD!

Downloads

Our PCD8544 (Nokia 5110) LCD display Arduino library is on github which comes with example code. This library uses 1/2 Kbytes of RAM since it needs to buffer the entire display but its very fast! The code is simple to adapt to any other microcontroller.

You’ll also need to get the Adafruit GFX Graphics core library which can print text, bitmaps, pixels, rectangles, circles and lines, also available on github.

The PCD8544 datasheet tells you all about what the display can do.

~learn.adafruit.com

 

https://raw.githubusercontent.com/wiki/olikraus/u8g2/img/uc1701_dogs102_uno_board_320.jpgGambar 5. [u8g2/wiki]

Library: LCD5110_Basic

Library: LCD5110_Graph

 

 

Save

Save

Save

Save

Save

Save

Save

Save

Save

Save

Save

Save

Save

Belajar penggunaan LCD “Nokia 5110” di sistem Arduino [video]

[ [ videos ] ]
[intense_tabs direction=”right” active_tab_background_color=”#000000″ active_tab_font_color=”#ffff00″ trigger=”click”] [intense_tab title=”Video01″ border=”3px solid #e8e8e8″ link_target=”_self” content_background_color=”#000000″ content_font_color=”#ffffff” icon_size=”1″ icon_position=”left”]

[/intense_tab] [intense_tab title=”Video02″ border=”3px solid #e8e8e8″ link_target=”_self” icon_size=”1″ content_background_color=”#000000″ content_font_color=”#ffffff” icon_position=”left”]

[/intense_tab] [intense_tab title=”Video03″ border=”3px solid #e8e8e8″ link_target=”_self” icon_size=”1″ content_background_color=”#000000″ content_font_color=”#ffffff” icon_position=”left”]

[/intense_tab] [intense_tab title=”Video04″ border=”3px solid #e8e8e8″ link_target=”_self” icon_size=”1″ content_background_color=”#000000″ content_font_color=”#ffffff” icon_position=”left”]

[/intense_tab] [intense_tab title=”Video05″ border=”3px solid #e8e8e8″ link_target=”_self” icon_size=”1″ content_background_color=”#000000″ content_font_color=”#ffffff” icon_position=”left”]

[/intense_tab] [intense_tab title=”Video06″ border=”3px solid #e8e8e8″ link_target=”_self” icon_size=”1″ content_background_color=”#000000″ content_font_color=”#ffffff” icon_position=”left”]

[/intense_tab] [/intense_tabs]
[intense_tabs direction=”right” active_tab_background_color=”#000000″ active_tab_font_color=”#ffff00″ trigger=”click”] [intense_tab title=”Video07″ border=”3px solid #e8e8e8″ link_target=”_self” content_background_color=”#000000″ content_font_color=”#ffffff” icon_size=”1″ icon_position=”left”]

[/intense_tab] [intense_tab title=”Video08″ border=”3px solid #e8e8e8″ link_target=”_self” icon_size=”1″ content_background_color=”#000000″ content_font_color=”#ffffff” icon_position=”left”]

[/intense_tab] [intense_tab title=”Video09″ border=”3px solid #e8e8e8″ link_target=”_self” icon_size=”1″ content_background_color=”#000000″ content_font_color=”#ffffff” icon_position=”left”]

[/intense_tab] [intense_tab title=”Video10″ border=”3px solid #e8e8e8″ link_target=”_self” icon_size=”1″ content_background_color=”#000000″ content_font_color=”#ffffff” icon_position=”left”]

[/intense_tab] [intense_tab title=”Video11″ border=”3px solid #e8e8e8″ link_target=”_self” icon_size=”1″ content_background_color=”#000000″ content_font_color=”#ffffff” icon_position=”left”]

[/intense_tab] [intense_tab title=”Video12″ border=”3px solid #e8e8e8″ link_target=”_self” icon_size=”1″ content_background_color=”#000000″ content_font_color=”#ffffff” icon_position=”left”]

[/intense_tab] [/intense_tabs]
[intense_tabs direction=”right” active_tab_background_color=”#000000″ active_tab_font_color=”#ffff00″ trigger=”click”] [intense_tab title=”Video13″ border=”3px solid #e8e8e8″ link_target=”_self” content_background_color=”#000000″ content_font_color=”#ffffff” icon_size=”1″ icon_position=”left”]

[/intense_tab] [intense_tab title=”Video14″ border=”3px solid #e8e8e8″ link_target=”_self” icon_size=”1″ content_background_color=”#000000″ content_font_color=”#ffffff” icon_position=”left”]

[/intense_tab] [intense_tab title=”Video15″ border=”3px solid #e8e8e8″ link_target=”_self” icon_size=”1″ content_background_color=”#000000″ content_font_color=”#ffffff” icon_position=”left”]

[/intense_tab] [/intense_tabs]