drive two different SSD1322 #1431
Unanswered
nibble-bit-dev
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Do you share the same reset line with both displays? If so you must not drive the reset line with the second display (because it was already reseted with the first init and generating a second reset will erase the init sequence of the first display) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm using u8g2 library with an SSD1322 dispaly.
All works perfectly.
No I'd want to add a second SSD1322 using the same set of pins, except clearly for the /CS pin.
I usually do that by spi protocol.
Now, I tried by the code as below way but without success:
My first attempt was define two different 'u8x8_avr_gpio_and_delay' function,
where I defined two different DISPLAY_CS_PIN definition.
DISPLAY_CS_PIN_0 //1st SSD1322
DISPLAY_CS_PIN_1 // 2nd SSD1322
//the code below is ONLY FOR TEST PURPOSE ...please do not consider as good programming..
uint8_t u8x8_avr_gpio_and_delay_0(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);
uint8_t u8x8_avr_gpio_and_delay_1(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);
also I defined two different u8g2_t data type.
u8g2_t u8g2_0;
u8g2_t u8g2_1;
Then I created two init functions:
void ssd1322_init_0()
{
}
void ssd1322_init_1()
{
}
This code does not work. And my write string function does not work.
The first parameter can be u8g2_0 or u8g2_1:
void ssd1322_write_string(u8g2_t u8g2, char str)
{
int ln = strlen(str);
u8g2_ClearBuffer(&u8g2);
u8g2_SetFont(&u8g2, u8g2_font_ncenB14_tr);
u8g2_DrawStr(&u8g2, 1, ln, str);
u8g2_SendBuffer(&u8g2);
}
Could you suggest me the right way to do this?
Thanks
nbdev
Beta Was this translation helpful? Give feedback.
All reactions