Open GoogleCodeExporter opened 8 years ago
What about
u8g_InitHWSPI(&u8g, &u8g_dev_ssd1351_128x128gh_hicolor_sw_spi, ... ?
Maybe also the setColor function has an issue...
Original comment by olikr...@gmail.com
on 13 May 2015 at 11:03
The GH variant of the constructor does nothing. And in the hello_world.c there
is no setColor function. Here is the code:
//this is what I've changed.
u8g_InitHWSPI(&u8g, &u8g_dev_ssd1351_128x128gh_hicolor_hw_spi, PN(1,2),
PN(1,1), PN(1,6));
void sys_init(void)
{
#if defined(__AVR__)
/* select minimal prescaler (max system speed) */
CLKPR = 0x80;
CLKPR = 0x00;
#endif
}
void draw(void)
{
u8g_SetFont(&u8g, u8g_font_6x10);
u8g_DrawStr(&u8g, 0, 15, "Hello World!");
}
int main(void)
{
sys_init();
u8g_setup();
for(;;)
{
u8g_FirstPage(&u8g);
do
{
draw();
} while ( u8g_NextPage(&u8g) );
u8g_Delay(100);
}
}
After playing around more with this, I realize that the Hello World! in reverse
is an artefact. Now I can only get it to display an all white screen or a white
screen with lots of scattered colored pixels. I am attaching a photo of the
screen. The vertical bands are just screen refreshes only visible to the
camera. To us, the screen looks like the white parts with the random colored
pixels.
I have checked ALL combinations of the pins, leaving the reset pin as PN(1,6):
1st:2nd pins
1,0:1,1
1,0:1,2
1,0:1,5
1,1:1,0
1,1:1,2
1,1:1,5
1,2:1,0
1,2:1,1
1,2:1,5
1,5:1,0
1,5:1,1
1,5:1,2
In a couple of cases I get the whole white screen, in the rest it's either the
screen as I've attached or blank. And after everything I ran the arduino
graphics_test and it ran just fine.
Original comment by vibhor.c...@gmail.com
on 14 May 2015 at 12:36
Attachments:
Well finally, i also can not say much here. U8glib does not really support
Teensy. I added some contributed code for the Teensy, but i do not know whether
this works or not and i can also not test this. Same is true for color
displays. I tried to move all color related code to ucglib. However ucglib also
does not support Teensy.
Original comment by olikr...@gmail.com
on 14 May 2015 at 4:38
I can help test teensy related code, if you'd like. Alternatively, I can try
the C source of Ucglib, if you could tell me where the SPI pins are defined...
Original comment by vibhor.c...@gmail.com
on 14 May 2015 at 7:03
for ucglib: Standard SPI.h library is used here. SW SPI is also supported. Pins
have to be provided as arguments of the constructor.
Original comment by olikr...@gmail.com
on 16 May 2015 at 11:38
Original issue reported on code.google.com by
vibhor.c...@gmail.com
on 13 May 2015 at 3:59