-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with PCF8812 #2421
Comments
I found the problem. In file u8g2_d_setup.c needs to be changed void u8g2_Setup_pcf8812_96x65_1(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb) on void u8g2_Setup_pcf8812_96x65_1(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb) |
Increasing the tile size will cause memory issues and indeed might lead to a reboot. What is the actual pixel width of your display? |
This is a display from Siemens C55. Actual pixel size is 101*64 |
I have created a new constructor "U8G2_PCF8812_101X64". You can download the latest U8g2 beta release from here: https://github.com/olikraus/U8g2_Arduino/archive/master.zip
PlatformIO:
|
The new library did not work because the display initialization was not changed. In the file u8x8_d_pcf8812.c you need to put static const uint8_t u8x8_d_pcf8812_96x65_init_seq[] = {
U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */
U8X8_C(0x21), // PowerON, ExtCommandSet
U8X8_C(0x09), // Internal HV-gen x3
U8X8_C(0xB7), // Set Vop
U8X8_C(0x16), // Bias n=2 //15
U8X8_C(0x06), // Temperature coeff 2
U8X8_C(0x20), // StandartCommandSet
U8X8_C(0x0C), // normal mode, display non-inverted
U8X8_END_TRANSFER(), /* disable chip */
U8X8_END() /* end of sequence */
}; I wrote this in my first message. After the replacement this code everything worked great. There is no garbage. |
Thanks for testing. I have added the missing init code in beta release 2.35.18 You can download the latest U8g2 beta release from here: https://github.com/olikraus/U8g2_Arduino/archive/master.zip
PlatformIO:
|
Unfortunately, this option without editing did not work either. I edited the |
|
created beta 2.35.19... You can download the latest U8g2 beta release from here: https://github.com/olikraus/U8g2_Arduino/archive/master.zip
PlatformIO:
|
Yes. Now everything works as it should. Thank you. |
Hello. I'm trying to start a display from Siemens C55 (PCF8812). The display only worked when I replaced it in the file u8x8_d_pcf8812.c Initialization sequence.
_static const uint8_t u8x8_d_pcf8812_96x65_init_seq[] = {
U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start /
U8X8_C(0x21), // PowerON, ExtCommandSet
U8X8_C(0x09), // Internal HV-gen x3
U8X8_C(0xB7), // Set Vop
U8X8_C(0x16), // Bias n=2 //15
U8X8_C(0x06), // Temperature coeff 2
U8X8_C(0x20), // StandartCommandSet
U8X8_C(0x0C), // normal mode, display non-inverted
U8X8_END_TRANSFER(), / disable chip /
U8X8_END() / end of sequence */
};_
I found this information on the Internet. Long-standing problem. The resolution is not yet specified correctly. It was also in the first version of this library.
Also changed the screen resolution-
_static const u8x8_display_info_t u8x8_pcf8812_96x65_display_info =
{
/* chip_enable_level = / 0,
/ chip_disable_level = */ 1,
/* post_chip_enable_wait_ns = / 100,
/ pre_chip_disable_wait_ns = / 100,
/ reset_pulse_width_ms = / 100,
/ post_reset_wait_ms = / 100,
/ sda_setup_time_ns = / 100,
/ sck_pulse_width_ns = / 100,
/ sck_clock_hz = / 4000000UL, / since Arduino 1.6.0, the SPI bus speed in Hz. Should be 1000000000/sck_pulse_width_ns /
/ spi_mode = / 0, / active high, rising edge /
/ i2c_bus_clock_100kHz = / 4,
/ data_setup_time_ns = / 40,
/ write_pulse_width_ns = / 150,
/ tile_width = / 12,
/ tile_height = / 9,
/ default_x_offset = / 0,
/ flipmode_x_offset = / 0,
/ pixel_width = / 101, // 96
/ pixel_height = */ 64
};_
Everything worked, but the five right columns are trash.
If I reduce this parameter (/* tile_width = */ 12) to 11, then there is more trash.
If you put (/* tile_width = */ 13) or more - the Arduino constantly reboots. Please, help.
The text was updated successfully, but these errors were encountered: