Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - BMohlman

Pages: [1]
Graphic LCDs / NHD‐C12864A1Z‐FS(RGB)‐FBW‐HT1 Initialization
« on: March 31, 2015, 10:41:06 AM »
 I have on of the above displays connected to a Kinetis K63F freedom board via SPI with I/O to the /RST and A0 inputs. I am running the SPI at 2MHz and I can't seem to get anything on the display. Here is my init routine: (hex value in the comments)

void GLCDInit(void)
     // toggle RST low to reset;
      OLED_WriteCmd(CMD_DISPLAY_OFF);            // Turn Display Off
      OLED_WriteCmd(CMD_SET_ADC_NORMAL);         // ADC select       ----->   0xA0
      OLED_WriteCmd(CMD_SET_DISP_NORMAL);         // Segment select   ----->  0xA6

      OLED_WriteCmd(CMD_SET_COM_NORMAL);         // 0xC0
      OLED_WriteCmd(CMD_SET_BIAS_9);            // 0xA2
      OLED_WriteCmd(CMD_SET_DISP_START_LINE);      // Initial display line ----> 0x40
      OLED_WriteCmd(CMD_SET_PAGE);            // 0xB0
      OLED_WriteCmd(CMD_SET_VOLUME_FIRST);      // 0x81
      OLED_WriteCmd(CMD_SET_VOLUME_SECOND);      // 0x20
      OLED_WriteCmd(CMD_SET_POWER_CONTROL | 0x4);   // turn on voltage converter (VC=1, VR=0, VF=0) 0x2C
      WAIT1_Waitms(50);                     // wait for 50% rising
      OLED_WriteCmd(CMD_SET_POWER_CONTROL | 0x6);   // turn on voltage regulator (VC=1, VR=1, VF=0) 0x2E
      OLED_WriteCmd(CMD_SET_POWER_CONTROL | 0x7);   // turn on voltage follower (VC=1, VR=1, VF=1) 0x2F
        OLED_WriteCmd(CMD_SET_RESISTOR_RATIO | 0x07);// set lcd operating voltage (regulator resistor, ref voltage resistor)
      OLED_WriteCmd(CMD_SET_ALLPTS_ON);         // Display ON Testing ****** Doesn't work 0xA5
      OLED_WriteCmd(CMD_DISPLAY_ON);            // Display ON 0xAF
  Display is always blank, I have scoped the SPI and I/O and the look correct. I have tried several different versions of init values to no avail. I have a NewHaven 2.7 OLED that I can plug into the same port and it works with no problems. (Same SPI and I/O)  Any help would be greatly appreciated.


Pages: [1]