Closed GoogleCodeExporter closed 8 years ago
low level procedures are here:
http://code.google.com/p/u8glib/source/browse/csrc/u8g_com_i2c.c
plain atmega and arduino code is here:
http://code.google.com/p/u8glib/source/browse/csrc/u8g_com_arduino_ssd_i2c.c
hope this helps.
Original comment by olikr...@gmail.com
on 27 Sep 2013 at 6:35
Thanks for your Quick reply
One question, does the init code command are sent in one shot ie start then all
command then stop or is There a start between all command ?
Because on the other code I saw There is start + command + code between each,
that could be a différence,
Original comment by ch.hall...@gmail.com
on 27 Sep 2013 at 6:49
the code uses a lot of repeated starts.
you might change this by commenting out u8g_i2c_stop() at several places. For
example here:
case U8G_COM_MSG_WRITE_BYTE:
//u8g->pin_list[U8G_PI_SET_A0] = 1;
if ( u8g_com_arduino_ssd_start_sequence(u8g) == 0 )
return u8g_i2c_stop(), 0;
if ( u8g_i2c_send_byte(arg_val) == 0 )
return u8g_i2c_stop(), 0;
// u8g_i2c_stop();
break;
But the code is working for the SSD1306. I had personally verified this with an
ATMEGA328
Can you measure acitivity on the pins? Did you select the correct slave adr?
Original comment by olikr...@gmail.com
on 27 Sep 2013 at 7:02
Yeah, I will try this, I agree, Adafruit works fine that is why I do not
understand because it is the same controller, and if I test tindie OLED with
adafruit demo code it works, this drive me nut.
If I can't resolve it I will need to investigate with logic analyser the code
send
Original comment by ch.hall...@gmail.com
on 27 Sep 2013 at 7:18
Hi,
Ok this is what I thought, took 3 screenshot with 3 different driver, u8g
driver send all commands in one shot and the other restart a i2c com after each
command. this is the difference and i think ssd1306 driver is very sensible to
this. I noticed sometimes that even with u8g and adafruit oled, I needed to
plug/unplug power several times before oled really start, may be this is due to
the same thing.
May be we could add a new escape sequence that after each command do a stop,
then restart a start with address with ometing like that
static const uint8_t u8g_dev_ssd1306_128x64_tindie_init_seq[] PROGMEM = {
U8G_ESC_CS(0), /* disable chip */
U8G_ESC_ADR(0), /* instruction mode */
U8G_ESC_RST(1), /* do reset low pulse with (1*16)+2 milliseconds */
U8G_ESC_CS(1), /* enable chip */
U8G_ESC_START(1), /* start new command */
0x0ae, /* display off, sleep mode */
U8G_ESC_START(1), /* start new command */
0x0a6, /* set normal display */
U8G_ESC_START(1), /* start new command */
0x0d5, 0x080, /* clock divide ratio (0x00=1) and oscillator frequency (0x8) ....
What do you think ?
Original comment by ch.hall...@gmail.com
on 27 Sep 2013 at 11:25
Attachments:
Sorry here the correct u8g graph
Original comment by ch.hall...@gmail.com
on 27 Sep 2013 at 11:33
Attachments:
Ok, problem solved, got lucky because tested on another board to do capture and
it worked 1st time. Only difference was the pull up, so I put pull up (Arduino
pullup does not seems to be enough). Tha Adafruit Oled has level shifter on
board with pull up, this is why it was working. All make sense now
You can close the case, sorry it was my mistake.
Once again, thank you for your nice job.
Original comment by ch.hall...@gmail.com
on 28 Sep 2013 at 12:26
Nice screenshots. I wished i had that kind of equpment. Thanks for the
information. I will close this issue.
Original comment by olikr...@gmail.com
on 28 Sep 2013 at 6:03
Original comment by olikr...@gmail.com
on 28 Sep 2013 at 6:04
Original issue reported on code.google.com by
ch.hall...@gmail.com
on 27 Sep 2013 at 3:46