ryood / STM32Cube_Test

1 stars 2 forks source link

Support for WA-128128-XLW.. #1

Open BinduShree-MV opened 4 years ago

BinduShree-MV commented 4 years ago

hello @ryood @ryood !! I have the round 128*128 round white LCD ; where I am using ur code "https://github.com/ryood/STM32Cube_Test/tree/master/SW4STM32/Nucleo-F446_u8g2_Test1" to display on it.

I have initialized the LCD as follows and trying to print the characters ;but the LCD is not displaying anything ; Its showing some random dots

`int main(void) { / MCU Configuration--------------------------------------------------------/ / Reset of all peripherals, Initializes the Flash interface and the Systick. / HAL_Init(); / Configure the system clock / SystemClock_Config(); / USER CODE BEGIN SysInit / HAL_Delay(100); / USER CODE END SysInit /

/ Initialize all configured peripherals / MX_GPIO_Init(); MX_USART2_UART_Init(); MX_SPI1_Init(); / USER CODE BEGIN 2 / u8g2_Setup_ssd1327_ea_w128128_f(&u8g2, U8G2_R0, u8x8_byte_4wire_hw_spi, u8x8_stm32_gpio_and_delay); u8g2_InitDisplay(&u8g2); u8g2_SetPowerSave(&u8g2, 0); / USER CODE END 2 /

/ Infinite loop / / USER CODE BEGIN WHILE / while (1) { / USER CODE END WHILE /

/* USER CODE BEGIN 3 */
u8g2_FirstPage(&u8g2);
do
{
    u8g2_SetFont(&u8g2, u8g2_font_ncenB14_tr);
    u8g2_DrawStr(&u8g2, 0, 15, "thanks!");
    u8g2_DrawCircle(&u8g2, 64, 40, 10, U8G2_DRAW_ALL);
} while (u8g2_NextPage(&u8g2));
HAL_Delay(1);

u8g2_SetContrast(&u8g2 , 0x00);     //setting contrast to low..
HAL_Delay(6000);
u8g2_SetContrast(&u8g2 , 0xFF);     //setting contrast to high..
HAL_Delay(6000);

u8g2_ClearDisplay(&u8g2);       //clear LCD...
HAL_Delay(6000);

} / USER CODE END 3 / }`

Can u please suggest where its going wrong. Have attached the LCD display pic as well.

NucleoF103RB_LCDdisplay

BinduShree-MV commented 4 years ago

Hello @ryood , How to do this for three wire SPI?

Thank you!!

ryood commented 4 years ago

This project is for SSD1306 and does not work well on SSD1306.

The SPI connection is as shown in this diagram https://github.com/ryood/STM32Cube_Test/blob/master/fritzing/STM32Cube_u8g2_SSD1306_%E3%83%96%E3%83%AC%E3%83%83%E3%83%89%E3%83%9C%E3%83%BC%E3%83%89.png

Here is an article I wrote about this project. (Please use google, DeepL, etc. to translate.) https://dad8893.blogspot.com/2019/04/stm32-u8g2.html

BinduShree-MV commented 4 years ago

Thank you soo much for the response @ryood It doesn't work for SD1306;How about SSD1327? I have made it intialize with SSD1327 with full buffer

ryood commented 4 years ago

Unfortunately I don't own an OLED SSD1327 and have never used it. If I know anything, I'll post it here or on my blog.

BinduShree-MV commented 4 years ago

Okay.. Thank you!!