-->
Page 11 of 24

Re: WIFI SCAN AND ACQUIRE OLED

PostPosted: Sat Jun 06, 2015 8:56 am
by danbicks
Hi Ramon,

A pleasure, would love to see some pics of the system.

Glad to be of help.

Dans

Re: WIFI SCAN AND ACQUIRE OLED

PostPosted: Sun Jun 07, 2015 3:21 am
by Mario Mikočević
Heya folks,

if you're planning to make PCB board for esp8266/oled combo be very careful !
They have different VCC and GND pinouts ie swapped.
I have now several 0.96" OLED boards I cannot simply replace with one another.


--
Mozz

Re: WIFI SCAN AND ACQUIRE OLED

PostPosted: Sun Jun 07, 2015 4:37 pm
by Mario Mikočević
Heya,

after some datasheet reading found the culprit for display misbehaving,
in the init code was missing addressing mode and scrolling parts,
here is my init_OLED() as per datasheet ->
(both versions of Draw_* work now)

Code: Select allstatic void init_OLED(void) {

  SendCommand( 0xAE );  // Set Display Off

  SendCommand(0xD5);    // Set Display Clock Divide Ratio\Oscilator Frequency
  SendCommand(0x80);    // the suggested ratio 0x80

  SendCommand(0xA8);    // Set Multiplex Ratio
  SendCommand(0x3F);

  SendCommand(0xD3);    // Set Display Offset
  SendCommand(0x00);    // no offset

  SendCommand(0x40);    // Set Display Start Line

  SendCommand(0x8D);    // Set Charge Pump
  SendCommand(0x14);    // Vcc internal

  SendCommand(0xA1);    // Set Segment Re-Map

  SendCommand(0xC8);    // Set COM Output Scan Direction

  SendCommand(0xDA);    // Set COM Pins Hardware Configuration
  SendCommand(0x12);

  SendCommand(0x81);    // Set Contrast Control
  SendCommand(0xCF);    // internal

  SendCommand(0xD9);    // Set Pre-Charge Period
  SendCommand(0xF1);    // internal

  SendCommand(0xDB);    // Set VCOMH Deselect Level
  SendCommand(0x40);

  SendCommand(0xA4);    // Set Entire Display On/Off

  SendCommand(0xA6);    // Set Normal/Inverse Display

  SendCommand( 0x2E );  // Deactivate Scroll

  SendCommand( 0x20 );  // Set Memory Addressing Mode
  SendCommand( 0x00 );  // Horizontal Addressing Mode

  SendCommand( 0xAF );  // Set Display On

}


--
Mozz

Re: WIFI SCAN AND ACQUIRE OLED

PostPosted: Sat Jun 13, 2015 7:12 am
by danbicks
Hi ya Mozz,

Well done you. I did not have any issue's with original Init code, well done fixing yours. I agree have to be careful with board layouts as displays do vary with pin-out configurations. I have just arrived from China some new ESP8266-12E versions, I will be using these for the final version with MQTT control.

Keep up the good work.

Dans