Comments (19)
Maybe a complete different solution could be to use stm32duino project.
from u8g2.
Can you link it please?
from u8g2.
Here is the link for the
Lcd
https://www.buydisplay.com/graphic-lcd-240x64-module-display-ra6963-fully-compatible-with-t6963
from u8g2.
Can you link it please?
For stm32duino? It is here: https://github.com/stm32duino
STM32Duino is a extension to the Arduino IDE. It will make almost any STM32 compatible with Arduino. U8g2 will then work out of the box.
from u8g2.
@olikraus
Can you check the display please if it needs any special pin configuration, for example negative CS,WR?
from u8g2.
there seems to be a copy & paste error in your code:
case U8X8_MSG_GPIO_D1: // D1 or SPI data pin: Output level in arg_int
HAL_GPIO_WritePin(DATA_PORT, D0_Pin, arg_int);
D0_Pin probably should be D1_Pin. Same issues for the other pins also...
from u8g2.
@olikraus
Sorry I fixed that already in my code, but I still don't get any display, any other things needed for logic to work ? I mean PIN configuration or PIN Logic state ?
from u8g2.
it looks like a standard T6963 display, which should work out of the box with u8g2.
Did you add a proper var-pot like show here: https://www.buydisplay.com/download/interfacing/ERM24064-1_Interfacing.pdf ?
from u8g2.
@olikraus
Yes I added it, no display is showing
from u8g2.
Then... I assume a wiring error...
from u8g2.
@olikraus
After MX_GPIO Init, I get horizontal line in the display, before u8g2 init, after its init, it goes out. that's very weird ? any idea?
I have doubled checked the connection, its correct
from u8g2.
@olikraus
I negated the reset pin in code, and I have two lines now... I'm drawing a string and a picture
from u8g2.
/* USER CODE BEGIN 2 */
u8g2_Setup_t6963_240x64_f(&u8g2, U8G2_R0,u8x8_byte_8bit_8080mode, u8x8_stm32_gpio_and_delay);
u8g2_InitDisplay(&u8g2);
u8g2_SetPowerSave(&u8g2, 0);
// clear VRAM
for (int y=0;y<LCD_ys;y++)
for (int x=0;x<LCD_xs>>3;x++)
VRAM[y][x]=col0;
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
u8g2_ClearBuffer(&u8g2);
u8g2_SetDrawColor(&u8g2,1);
u8g2_DrawCircle(&u8g2, 20, 20, 20, U8G2_DRAW_ALL);
u8g2_SetFont(&u8g2, u8g2_font_ncenB14_tr);
u8g2_DrawStr(&u8g2, 0, 15, "Tarkan");
for(int i = 0; i < 200; i++)
{
u8g2_DrawPixel(&u8g2, i, i);
}
u8g2_SendBuffer(&u8g2);
from u8g2.
Running this, I get a line
Without even Initializing the display
__HAL_RCC_GPIOE_CLK_ENABLE();
GPIO_InitStruct.Pin = GPIO_PIN_2|GPIO_PIN_3|GPIO_PIN_4|GPIO_PIN_5
|GPIO_PIN_6|GPIO_PIN_7|GPIO_PIN_8|GPIO_PIN_9
|GPIO_PIN_10|GPIO_PIN_11|GPIO_PIN_12|GPIO_PIN_0
|GPIO_PIN_1;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_MEDIUM;
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
from u8g2.
I also noticed something very weird, when I remove pin 3 VDD which is 5V, and at power the MCU, I see the LCD is working(light on), how come ?!
from u8g2.
uint8_t u8x8_stm32_gpio_and_delay(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr)
{
switch(msg)
{
case U8X8_MSG_GPIO_AND_DELAY_INIT:
/* Insert codes for initialization */
break;
case U8X8_MSG_DELAY_10MICRO:
for (uint16_t n = 0; n < 320; n++)
{
__NOP();
}
break;
case U8X8_MSG_DELAY_NANO:
delay_ns(arg_int);
break;
case U8X8_MSG_DELAY_100NANO:
for(int i = 0; i < 100; i++)
{
delay_ns(1);
}
break;
case U8X8_MSG_DELAY_MILLI:
/* ms Delay */
HAL_Delay(arg_int);
break;
case U8X8_MSG_GPIO_E:
/* Insert codes for SS pin control */
HAL_GPIO_WritePin(GPIOE, WR_Pin, arg_int);
break;
case U8X8_MSG_GPIO_CS:
/* Insert codes for SS pin control */
HAL_GPIO_WritePin(GPIOE, CE_Pin, arg_int);
break;
case U8X8_MSG_GPIO_DC:
/* Insert codes for DC pin control */
HAL_GPIO_WritePin(GPIOE, CD_Pin, arg_int);
break;
case U8X8_MSG_GPIO_RESET:
/* Insert codes for RST pin control */
HAL_GPIO_WritePin(GPIOE, GPIO_PIN_4, arg_int);
break;
case U8X8_MSG_GPIO_D0: // D0 or SPI clock pin: Output level in arg_int
HAL_GPIO_WritePin(GPIOE, D0_Pin, arg_int);
break;
case U8X8_MSG_GPIO_D1: // D1 or SPI data pin: Output level in arg_int
HAL_GPIO_WritePin(GPIOE, D1_Pin, arg_int);
break;
case U8X8_MSG_GPIO_D2: // D2 pin: Output level in arg_int
HAL_GPIO_WritePin(GPIOE, D2_Pin, arg_int);
break;
case U8X8_MSG_GPIO_D3: // D3 pin: Output level in arg_int
HAL_GPIO_WritePin(GPIOE, D3_Pin, arg_int);
break;
case U8X8_MSG_GPIO_D4: // D4 pin: Output level in arg_int
HAL_GPIO_WritePin(GPIOE, D4_Pin, arg_int);
break;
case U8X8_MSG_GPIO_D5: // D5 pin: Output level in arg_int
HAL_GPIO_WritePin(GPIOE, D5_Pin, arg_int);
break;
case U8X8_MSG_GPIO_D6: // D6 pin: Output level in arg_int
HAL_GPIO_WritePin(GPIOE, D6_Pin, arg_int);
break;
case U8X8_MSG_GPIO_D7: // D7 pin: Output level in arg_int
HAL_GPIO_WritePin(GPIOE, D7_Pin, arg_int);
break;
default:
u8x8_SetGPIOResult(u8x8, 1); // default return value
break;
}
return 1;
}``
from u8g2.
from u8g2.
@olikraus
I have followed your advice and used stm32arduino, and still no output to the display
I used graphics test as example
from u8g2.
I am a little bit confused by the purple ERM2 graphics LCD connector. What exactly is the purpose of this device. What is the schematic for this purple add on board?
from u8g2.
Related Issues (20)
- t6963 f Data Hold Time HOT 6
- How to switch to the next page in u8g2 HOT 1
- SPI is Broken on ESP32 S2 mini. (Possibly S2 as well) HOT 1
- Can I use u8g2 with SSD1357 mono mode? HOT 3
- SH1107 128x128 OLED text jumbled around HOT 6
- Support for Monochrome Low-Power ST7302 Display HOT 1
- Using ERC240160 in ESP32S3 SPI HW mode does not work HOT 1
- Artefacts using U8G2_SSD1309_128X64_NONAME0_F_4W_SW_SPI OLED Display
- internal compiler error: in type_hash_canon, at tree.c:7158 HOT 1
- U8g2 font size and type HOT 3
- New Version UW ttyp0
- How to print accented characters with U8g2lib in character mode ? HOT 4
- Doubt in constructor for KS0108 Controller based 128X64 GLCD HOT 1
- The width of the text obtained using u8g2_GetStrWidth is very strange HOT 10
- UW TTYP0 Font Update
- UC1611s The first line displays a vertical coordinate of 8, which on an LCD display is equivalent to a downward translation of the screen coordinate by 8 HOT 2
- U8g2 library issue with Arduino nano RP2040 processor HOT 4
- Just wanted to add this improvement to help someone in the future. :) HOT 1
- Oled display - Bitmap not working oled SSD1107 IIC HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from u8g2.