This commit is contained in:
olikraus
2016-08-18 21:15:10 +02:00
parent d1a5023ca0
commit 00db2ef09e
7 changed files with 39 additions and 10 deletions
+7
View File
@@ -150,6 +150,13 @@
25. June 2016
U8G2_SSD1306_128X64_NONAME_F_4W_HW_SPI HW SPI FPS: Clip=56.4 Box=114.1 @=8.6 Pix=12.9
U8G2_SSD1306_128X64_NONAME_1_4W_HW_SPI HW SPI FPS: Clip=27.7 Box=87.7 @=4.3 Pix=7.1
18. Aug 2016
U8G2_ST7920_128X64_1_HW_SPI Uno FPS: Clip=13.2 Box=11.5 @=3.7 Pix=5.9
U8G2_ST7920_128X64_1_SW_SPI Uno FPS: Clip=1.2 Box=1.2 @=0.9 Pix=1.1
U8G2_ST7920_128X64_1_SW_SPI Due FPS: Clip=3.1 Box=3.1 @=2.8 Pix=2.9
U8G2_ST7920_128X64_1_HW_SPI Due FPS: Clip=26.2 Box=25.8 @=13.9 Pix=15.3
*/
+3 -1
View File
@@ -31,5 +31,7 @@ https://github.com/olikraus/u8g2 ChangeLog
* Fixed SSD1306 I2C procedures (mirror pixel in last tile column, issue 44)
* Experimental support für mini12864 (pull request)
* Use beginTransaction for SPI. This requires Arduino 1.6.0
2016-08-18 v2.3.x olikraus@gmail.com
* MINI12874; Fixed HW Flip Mode (pull request 49)
* Fixed ST7920 HW SPI with very fast uC, issue 50
+1 -1
View File
@@ -1,5 +1,5 @@
name=U8g2
version=2.2.7
version=2.3.0
author=oliver <olikraus@gmail.com>
maintainer=oliver <olikraus@gmail.com>
sentence=Library for monochrome LCDs and OLEDs. Successor of U8glib.
+17 -1
View File
@@ -74,7 +74,23 @@ extern "C" uint8_t u8x8_gpio_and_delay_arduino(u8x8_t *u8x8, uint8_t msg, uint8_
}
break;
#ifndef __AVR__
/* this case is not compiled for any AVR, because AVR uC are so slow */
/* that this delay does not matter */
case U8X8_MSG_DELAY_NANO:
delayMicroseconds(arg_int==0?0:1);
break;
#endif
case U8X8_MSG_DELAY_10MICRO:
/* not used at the moment */
break;
case U8X8_MSG_DELAY_100NANO:
/* not used at the moment */
break;
case U8X8_MSG_DELAY_MILLI:
delay(arg_int);
break;
+1 -1
View File
@@ -79,7 +79,7 @@
U8X8_MSG_DELAY_MILLI
U8X8_MSG_DELAY_10MICRO
U8X8_MSG_DELAY_100NANO
U8X8_MSG_DELAY_NANO
*/
#ifndef _U8X8_H
+5 -1
View File
@@ -123,13 +123,16 @@ uint8_t u8x8_d_st7920_common(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *a
*/
c = ((u8x8_tile_t *)arg_ptr)->cnt; /* number of tiles */
ptr = ((u8x8_tile_t *)arg_ptr)->tile_ptr; /* data ptr to the tiles */
/* The following byte is sent to allow the ST7920 to sync up with the data */
/* it solves some issues with garbage data */
u8x8_cad_SendCmd(u8x8, 0x03e ); /* enable extended mode */
for( i = 0; i < 8; i++ )
{
u8x8_cad_SendCmd(u8x8, 0x03e ); /* enable extended mode */
u8x8_cad_SendCmd(u8x8, 0x080 | (y+i) ); /* y pos */
u8x8_cad_SendCmd(u8x8, 0x080 | x ); /* set x pos */
c = ((u8x8_tile_t *)arg_ptr)->cnt; /* number of tiles */
u8x8->gpio_and_delay_cb(u8x8, U8X8_MSG_DELAY_NANO, 200, NULL); /* extra dely required */
u8x8_cad_SendData(u8x8, c, ptr); /* note: SendData can not handle more than 255 bytes, send one line of data */
ptr += c;
@@ -181,6 +184,7 @@ static const u8x8_display_info_t u8x8_st7920_128x64_display_info =
/* sda_setup_time_ns = */ 20,
/* sck_pulse_width_ns = */ 140, /* datasheet ST7920 */
/* sck_clock_hz = */ 1000000UL, /* since Arduino 1.6.0, the SPI bus speed in Hz. Should be 1000000000/sck_pulse_width_ns */
/* ST7920+Due work with 1MHz but not with 2MHz, ST7920+Uno works with 2MHz */
/* spi_mode = */ 1, /* active high, rising edge */
/* i2c_bus_clock_100kHz = */ 4,
/* data_setup_time_ns = */ 30,
+5 -5
View File
@@ -82,16 +82,16 @@ static const uint8_t u8x8_d_uc1701_mini12864_powersave1_seq[] = {
static const uint8_t u8x8_d_uc1701_mini12864_flip0_seq[] = {
U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */
U8X8_C(0x0a1), /* segment remap a0/a1*/
U8X8_C(0x0c0), /* c0: scan dir normal, c8: reverse */
U8X8_C(0x0a0), /* segment remap a0/a1*/
U8X8_C(0x0c8), /* c0: scan dir normal, c8: reverse */
U8X8_END_TRANSFER(), /* disable chip */
U8X8_END() /* end of sequence */
};
static const uint8_t u8x8_d_uc1701_mini12864_flip1_seq[] = {
U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */
U8X8_C(0x0a0), /* segment remap a0/a1*/
U8X8_C(0x0c8), /* c0: scan dir normal, c8: reverse */
U8X8_C(0x0a1), /* segment remap a0/a1*/
U8X8_C(0x0c0), /* c0: scan dir normal, c8: reverse */
U8X8_END_TRANSFER(), /* disable chip */
U8X8_END() /* end of sequence */
};
@@ -116,7 +116,7 @@ static const u8x8_display_info_t u8x8_uc1701_display_info =
/* tile_width = */ 16, /* width of 16*8=128 pixel */
/* tile_hight = */ 8,
/* default_x_offset = */ 0,
/* flipmode_x_offset = */ 30,
/* flipmode_x_offset = */ 4,
/* pixel_width = */ 128,
/* pixel_height = */ 64
};