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.


Topics - docmur

Pages: [1]
1
OLEDs / NHD-0420CW With PIC32MX Controller
« on: May 11, 2015, 12:25:06 PM »
Hey Guys

I've been given this LCD to get working with my PIC32MX360F256L microcontroller and I can't for the life of me get anything to happen with it.  I've tried the sample code from the datasheet, I've tried several different Arduino examples and nothing I do will allow this LCD to function normally.  I current have my SPI configured for IDLE high lock and I've tried sampling in the middle and at the end of the CLK.

My configuration is:

SCLK  - SCLK
SDO   - SCO
SDI    - SDI
SS      - LCD_SS

I have everything else hooked up as per the datasheet and yet I can't talk to it no matter what I do.  So far the closest I've gotten was to talk to the LCD using this funciton:

void init_lcd(void)
{
    LCD_SS_TRIS = 0;
    LCD_SS = 1;

    delay_10us(10000);
    LCD_SS = 0;
    delay_10us(5);
    writeSPI1(0x01); //clear display
    writeSPI1(0x02); // Return home
    writeSPI1(0x06);
    writeSPI1(0x00);
    writeSPI1(0x0C); //display ON
    delay_10us(10000);
    LCD_SS = 1;
}

this code made a garbage characters show up, but it did turn on the screen.

I have my SPI setup in 8 bit format, I've also tried to bit bang the interface over the SPI lines.

Thanks

Docmur

Pages: [1]