User Tools

Site Tools


arduino:displays_for_classic_arduinos:nokia_5110_displays_and_classic_arduinos_speed_test

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
arduino:displays_for_classic_arduinos:nokia_5110_displays_and_classic_arduinos_speed_test [2018/01/27 22:20] – ↷ Page name changed from arduino:displays_for_classic_arduinos:nokia_5110_display_and_classic_arduinos_speed_test to arduino:displays_for_classic_arduinos:nokia_5110_displays_and_classic_arduinos_speed_test mithatarduino:displays_for_classic_arduinos:nokia_5110_displays_and_classic_arduinos_speed_test [2018/02/01 20:06] (current) – [Summary evaluation] mithat
Line 1: Line 1:
-====== Nokia 5110 displays and Arduino Uno: speed test ======+====== Nokia 5110 displays and classic Arduinos: speed test ======
  
-I used [[https://github.com/olikraus/u8g2/wiki | U8g2]] to see how quickly a Nokia 5110 display could be updated with an Arduino Uno (actually a 3.3V 8 MHz Pro Mini). The good news is that it is fast enough. The bad news is that it's still a bit of a memory glutton, consing 42% of program storage and 24% of dynamic memory. It's probably all the data for the lovely fonts.+===== Summary evaluation =====
  
-Speed will probably roughly double with a 16 MHz boardbut there are no 16 MHz 3.3V boards, so that means you'll have to complicate things a bit with level shifters+For more general information on this displaysee [[arduino:displays_for_classic_arduinos:nokia_5110_displays_and_classic_arduinos | this]].
  
-<file c++ display_nokia_5110_u8g2_counter.ino> +One might expect this 84×48 display with 1 bit color depth to be updateable pretty quickly even with a torpid Uno/Nano/Pro Mini, and indeed it isThe bad news is that it's still a bit of a memory glutton. Most of that is probably the data for the lovely fonts. Lunches are never free.
-#include <U8g2lib.h>+
  
-/* +===== Tests =====
-  display_nokia_5110_u8g2_counter.ino +
-   +
- * Test screen update speed with large solid fonts on  +
- * a Nokia 5110 screen that uses the PCD8544 controller. +
- *  +
- * Notes: +
- * Consumes 42% of program storage space and +
- * 24% of dynamic memory on a Pro Mini. +
- */+
  
-/* +I used [[https://github.com/olikraus/u8g2/wiki | U8g2]] with a Nokia 5110 display and a 3.3V 8 MHz Arduino Pro Mini. The module came from an Asian source. This one has white LED illumination. Some have blue.
- * Pin assignments: +
- * RST: 8 +
- * CE/CS/SCE: 10 +
- * DC/"D/C": 9 +
- * DIN/DN/MOSI/DATA: 11 +
- * CLK/SCLK/SCK: 13 +
- * VCC: 3.3V +
- * LIGHT/LED: ground through 330 ohm resistor +
- * GND: ground +
- */+
  
-const unsigned int CLOCK_PIN = 13+The frame update time of 100 ms (the inverse of the fps noted in the [[display_nokia_5110_u8g2_counter.ino | source code]]) is respectableand  
-                   DATA_PIN = 11, +character change artifacts are not objectionable. The frame update time is expected to halve with a 16 MHz boardbut there are no 16 MHz 3.3V boardsso that means you'll have to complicate things a bit with level shifters. Memory use is 42% of program storage and 24% of dynamic memory.
-                   CS_PIN = 10, +
-                   DC_PIN = 9, +
-                   RESET_PIN = 8;+
  
-//U8G2_PCD8544_84X48_1_4W_SW_SPI u8g2 = U8G2_PCD8544_84X48_1_4W_SW_SPI(U8G2_R0CLOCK_PIN, DATA_PIN, CS_PIN, DC_PIN, RESET_PIN);  // SW SPI +The glare on the edges is an artifact from the four LEDs used to backlight the display. In real life the arifact doesn't appear as glarebut it is clear on inspection that there are four sources of illumination. 
-U8G2_PCD8544_84X48_1_4W_HW_SPI disp = U8G2_PCD8544_84X48_1_4W_HW_SPI(U8G2_R0, CS_PIN, DC_PIN, RESET_PIN);                       // HW SPI+
  
-unsigned int counter 80; +{{youtube>onaPb7xRJB8?560x315&rel=0}}
-char dispStr[4];    // null terminated char array used to pass to renderer.+
  
-void setup(void) { +[[display_nokia_5110_u8g2_counter.ino | source code]]
-  disp.begin(); +
-  disp.setContrast(145); +
-  disp.setColorIndex(1); +
-}+
  
-void loop(void) { 
-  counter = (counter + 1) % 1000; 
-     
-  // picture loop 
-  disp.firstPage(); 
-  do {   
-    disp.setFont(u8g2_font_5x8_tr);    
-    disp.drawStr(0, 6, "PCD8544 u8g2"); 
- 
-    disp.setFont(u8g2_font_logisoso38_tr); 
-    String(counter).toCharArray(dispStr, 4); 
-    disp.drawStr( 0, 47, dispStr); 
-  } while ( disp.nextPage() ); 
- 
-  /* inherent frame rate is about 10 fps with 8MHz processor  
-     (without additional delay). */ 
-  delay(500); 
-} 
-</file>  
arduino/displays_for_classic_arduinos/nokia_5110_displays_and_classic_arduinos_speed_test.1517091612.txt.gz · Last modified: 2018/01/27 22:20 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki