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.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
arduino:displays_for_the_arduino_uno:nokia_5110_display_and_arduino_uno_speed_test [2018/01/27 01:55] – mithat | arduino:displays_for_classic_arduinos:nokia_5110_displays_and_classic_arduinos_speed_test [2018/01/28 06:20] – [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:// | + | ===== Summary evaluation ===== |
- | <file c++ display_nokia_5110_u8g2_counter.ino> | + | For general information on this display, see [[arduino: |
- | #include < | + | |
- | /* | + | 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 is. The frame update time of 100 ms (the inverse of the fps noted in the [[display_nokia_5110_u8g2_counter.ino |
- | | + | character change artifacts are not objectionable. The frame update |
- | * | + | |
- | * Test screen | + | |
- | | + | |
- | * | + | |
- | * Notes: | + | |
- | * Consumes 42% of program storage space and | + | |
- | * 24% of dynamic memory on a Pro Mini. | + | |
- | */ | + | |
- | /* | + | The bad news is that it's still a bit of a memory glutton, consuming 42% of program storage and 24% of dynamic memory. Most of that is probably the data for the lovely fonts. Lunches are never free. |
- | * Pin assignments: | + | |
- | * RST: 8 | + | |
- | * CE/CS/SCE: 10 | + | |
- | * DC/" | + | |
- | * DIN/ | + | |
- | * CLK/ | + | |
- | * VCC: 3.3V | + | |
- | * LIGHT/LED: ground through 330 ohm resistor | + | |
- | * GND: ground | + | |
- | */ | + | |
- | const unsigned int CLOCK_PIN | + | ===== Tests ===== |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | //U8G2_PCD8544_84X48_1_4W_SW_SPI u8g2 = U8G2_PCD8544_84X48_1_4W_SW_SPI(U8G2_R0, | + | 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. |
- | U8G2_PCD8544_84X48_1_4W_HW_SPI disp = U8G2_PCD8544_84X48_1_4W_HW_SPI(U8G2_R0, | + | |
- | unsigned int counter = 80; | + | The glare on the edges is an artifact from the four LEDs used to backlight the display. In real life the arifact doesn' appear as glare, but it is clear on inspection that there are four sources of illumination. |
- | char dispStr[4]; | + | |
- | void setup(void) | + | {{youtube> |
- | disp.begin(); | + | |
- | disp.setContrast(145); | + | |
- | disp.setColorIndex(1); | + | |
- | } | + | |
- | void loop(void) { | + | [[display_nokia_5110_u8g2_counter.ino | source code]] |
- | counter = (counter + 1) % 1000; | + | |
- | + | ||
- | // picture loop | + | |
- | disp.firstPage(); | + | |
- | do { | + | |
- | disp.setFont(u8g2_font_5x8_tr); | + | |
- | // disp.setFont(u8g2_font_profont10_tr); | + | |
- | disp.drawStr(0, | + | |
- | disp.setFont(u8g2_font_logisoso38_tr); | ||
- | String(counter).toCharArray(dispStr, | ||
- | disp.drawStr( 0, 47, dispStr); | ||
- | } while ( disp.nextPage() ); | ||
- | |||
- | // inherent frame rate is about 10 fps (without additional delay). | ||
- | delay(500); | ||
- | } | ||
- | </ |
arduino/displays_for_classic_arduinos/nokia_5110_displays_and_classic_arduinos_speed_test.txt · Last modified: 2018/02/01 20:06 by mithat