111 lines
5.0 KiB
Plaintext
111 lines
5.0 KiB
Plaintext
|
|
Wiring
|
|
|
|
Q: Why does my xxx_SW_I2C() device not work with my other I2C devices?
|
|
A: SW_I2C emulates I2C with digitalWrite(), which will have a conflict with other
|
|
I2C devices at the same pins. There are two options: (A) use xxx_HW_I2C() or
|
|
(B) use different pins with xxx_SW_I2C()
|
|
|
|
Q: My display has a pin labled as "A0" (or "RS"). How to connect this pin?
|
|
A: There are different names for the "data/command" pin. In U8g2 only the name
|
|
"dc" is used. On the display side it might be also called "A0", "RS", "CD".
|
|
See also the next question.
|
|
|
|
Q: The pin names on my display do not fit to the pin names of U8g2.
|
|
A: Yes, each datasheet/product/controller has different names. There
|
|
is a mapping table on the wiki for this:
|
|
https://github.com/olikraus/u8g2/wiki/u8g2setupcpp#wiring
|
|
|
|
Q: What is wrong with connecting Reset (RES) of my display with the Reset of my
|
|
Arduino Board?
|
|
A:
|
|
- Both are inputs. It does not make sense to connect two inputs
|
|
- Both pins have completly different functions: The reset of your board will reset
|
|
the Arduino board, the reset of the display will reset the display.
|
|
Please connect the reset input of the display with a normal GPIO pin of your board.
|
|
|
|
Q: Shell I connect CS (chip select) with the SS output of the Arduino board?
|
|
A: In general this is required neither for hardware or software SPI.
|
|
|
|
Q: My board has a MOSI and a SCK output. Do i need to connect this to the
|
|
clock and data pins of my display?
|
|
A: "Yes" if you want to use hardware SPI (u8g2 constructors ending in _HW_SPI).
|
|
You can use any pins with the software emulated SPI of u8g2 (constructors ending
|
|
in _SW_SPI). Howver in general it is better to use hardware SPI to get a better
|
|
performance of your display.
|
|
|
|
|
|
Displays
|
|
|
|
Q: There is an x-offset on my SSD1306 128x64 OLED.
|
|
A: This is not a SSD1306 OLED, instead use the SH1106 constructor.
|
|
|
|
Q: A T6963 misses columns on the display/has garbled output.
|
|
A: Ensure that the T6963 operates in 8x8 mode:
|
|
If the display module has two font select (FSx) pins, connect both to GND
|
|
If the display module has one font select (FS) pin, connect it to GND
|
|
|
|
Q: My T6963 has a RD input. How shell this be connected?
|
|
A: The RD input for any 8080 interface has to be connected to power supply (5V or 3.3V,
|
|
depending on the display)
|
|
|
|
Q: My controller/interface combination is not listed in the examples.
|
|
A: Yes, the complete list is here:
|
|
https://github.com/olikraus/u8g2/wiki/u8g2setupcpp
|
|
|
|
Q: My display controller is listed, but the display dimension is not supported.
|
|
A: Raise an issue in the u8g2 tracker "https://github.com/olikraus/u8g2/issues"
|
|
|
|
Q: My controller is not listed, What can I do?
|
|
A: First check whether this controller is compatible to one of the supported
|
|
controller:
|
|
Supported: ST7565, Compatible: NT7534, UC1701, SED1565, S1D15605, S6B0723, SPLC502
|
|
Supported: SED1330, Compatible: SED1335, RA8835, S1D3305
|
|
Supported: LC7981, Compatible: NT7086, (maybe also: HD61830)
|
|
This table just reflects my current knowledge. It is not tested and may not be true at all.
|
|
Raise an issue in the u8g2 issue tracker, If your controller for a monochrome display is not listed.
|
|
A more detailed discussion of some controllers is listed in "controller_cmds.txt"
|
|
|
|
|
|
U8g2
|
|
|
|
Q: What is the meaning of the F/1/2 in the U8g2 constructor name?
|
|
A: "F" means full buffer mode. The entire display is rendered in RAM. Use
|
|
"sendBuffer" to transfer this RAM buffer to the display. "1" and "2" constructors
|
|
will store one or two pages of the display in RAM only. Use the firstPage/nextPage
|
|
loop to create the image for the display.
|
|
|
|
Q: What is the meaning of "SW"/"HW" in the U8g2 constructor name?
|
|
A: "SW" means, that the protocol is emulated by software. For example
|
|
the SW_I2C will not use the I2C subsystem of your board. The "HW" constructor
|
|
will use the hardware subsystem on your uC. For an Arduino board, HW_I2C will
|
|
call the Wire library for hardware accelerated I2C communication. "HW"
|
|
constructors are much faster, but maybe debugging and setup is more
|
|
easier with a "SW" constructor.
|
|
|
|
Q: How to activate 16 Bit mode?
|
|
A:
|
|
|
|
Q: U8g2 requires a lot of memory. How to reduce this?
|
|
- Limit the font size. If possible avoid "f" fonts, instead use "r" fonts
|
|
- If the I2C interface is not required, then uncomment #define U8X8_HAVE_HW_I2C in U8x8lib.h
|
|
(Background: Due to a problem in Wire.h, the I2C Arduino lib is always included)
|
|
|
|
Q: How can I generate my own font.
|
|
A: The font must be available in bdf file format. Then use bdfconv to generate
|
|
the font data. The font data can be pasted into an existing file of your project.
|
|
|
|
Q: Which commandline options are required for bdfconv?
|
|
A: "bdfconv -f 1 -m '32-255' -n fontname -o myfont.c myfont.bdf"
|
|
"-f 1" generates a u8g2 font.
|
|
"-m '32-255'" selects unicode 32 to 255.
|
|
"-n fontname": This is the name of the font in C/C++/Ino files.
|
|
"-o myfont.c": The font array will be stored in this file.
|
|
"myfont.bdf": The input file with the font data (bdf format).
|
|
|
|
Q: Where do I find bdfconv?
|
|
A: At the moment there is no executable. Just compile the sources from
|
|
this directory:
|
|
https://github.com/olikraus/u8g2/tree/master/tools/font/bdfconv
|
|
|