-
Notifications
You must be signed in to change notification settings - Fork 1.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
help stm32f05, ST7565 nhdc12864 #668
Comments
Your byte function seems to be a copy of the u8g2 sw spi function. Maybe you should start with the existing sw spi function just to see whether this works. It is also a good idea to check whether you can see activity on the SPI pins. |
Hi, I'm having similiar problem. _- Description Resource Path Location Type
The RAM memory is being exceeded. I don't know why. I know that similiar problem was mentioned in the #179 and there was some buffer introduced in order to solve this issue but I don't get that solution. Could you give me any hint what am I doing wrong? Code:
Thanks in advance. |
U8g2 relies on the linker to remove unused buffers. There are specific flags for the gnu linker to do this. |
Is there any example of use of it? |
https://github.com/olikraus/u8g2/blob/master/sys/arm/lpc824/u8g2_logo/Makefile -ffunction-sections -fdata-sections |
Hi, thanks a lot! But could you just take a gimpse on my code?
Thanks in advance. |
The drawing commands must be enclosed by FirstPage/NextPage commands: Or: If you would use the full buffer constructor ( |
I still cannot display anything on the screen :/
|
ok, I am confused. |
@olikraus Sorry, I believe I should have opened new issue. |
ok, but then there is nothing what i can do. Suggestion is to debug the gpio and delay procedure and ensure that signals are available the the gpio pins. |
@olikraus After changing of the project I can see the signals on the SPI SCL and MOSI on the GPIO however the code stops after calling u8g2_InitDisplay() when the e-Paper is connected. |
@olikraus , sorry for the late response. |
@gustavolyra Thanks for your feedback |
@olikraus I was able to observe the SPI communication on the pins. RST was HIGH, SCK was periodical and there were some variations on the MOSI. |
If the DC pin also works, then this sounds good. |
Hello,
it's my first time using u8g2 and I want to use the stm32f05 board. My display is a nhdc 128x64, ST7565.
I did the setup from #179 and #356, it should show a line but so far nothing happens.
my code:
//------------------------
//includes
#include "u8g2.h" #include "u8x8.h" //LCD 128x64 u8g2_t u8g2; uint8_t count = 0; uint8_t lcd_refresh_time = 1; char
string_1[30];`//------------------------------------------------------
//init and loop
`u8g2_Setup_st7565_nhd_c12864_2(&u8g2, U8G2_R0, u8x8_byte_4wire_hw_spi, u8g2_gpio_and_delay_stm32); // init u8g2 structure
u8g2_InitDisplay(&u8g2); // send init sequence to the display, display is in sleep mode after this,
u8g2_SetPowerSave(&u8g2, 0); // wake up display
u8g2_SetContrast(&u8g2, 250);
u8g2_SendBuffer(&u8g2);
HAL_Delay(100);
/* USER CODE END 2 */
/* Infinite loop /
/ USER CODE BEGIN WHILE */
while (1)
{
u8g2_DrawLine(&u8g2, 20, 5, 5, 32);
}`
//-------------------------------------
`uint8_t u8x8_byte_4wire_hw_spi(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr)
{
uint8_t i, b;
uint8_t *data;
uint8_t takeover_edge = u8x8_GetSPIClockPhase(u8x8);
uint8_t not_takeover_edge = 1 - takeover_edge;
switch(msg)
{
case U8X8_MSG_BYTE_SEND:
data = (uint8_t *)arg_ptr;
while( arg_int > 0 ){
b = *data;
data++;
arg_int--;
for( i = 0; i < 8; i++ ){
if ( b & 128 )
u8x8_gpio_SetSPIData(u8x8, 1);
else
u8x8_gpio_SetSPIData(u8x8, 0);
b <<= 1;
}
return 1;
}`
//--------------------------------------------------------
`uint8_t u8g2_gpio_and_delay_stm32(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr){
switch(msg)
{
case U8X8_MSG_GPIO_AND_DELAY_INIT: // called once during init phase of u8g2/u8x8
break; // can be used to setup pins
}
return 1; // command processed successfully.
}`
The text was updated successfully, but these errors were encountered: