This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

LCD Display Driver

Hello,

I bought a SainSmart display which fits on the PCA10028 development board. This display is a 16x2 character display with a HD44780 display contoller (I guess). Does anybody know if there is a driver available that runs on the nRF51422? If not, maybe I can adapt a driver for a similar display. Thanks, Mathias

Parents
  • Hi Mathias

    I made a simple bit-banged HD44780 driver for the nRF52 recently, but it uses only the GPIO and delay libraries and should work fine on the nRF51 as well.

    The main limitation at the moment is that it assumes that all the control pins from the nRF5x will be together (ie pins P0.08-P0.15 without any unused pins in between), so you will have to make some changes to the library to get around this limitation.

    nrf_hd44780.c
    nrf_hd44780.h

    Best regards
    Torbjørn

  • Hi Mark. We do not have the resources to investigate this problem at the moment. I will ask you to try to find out the problem yourself. I noticed in the nrf_hd44780.h file that the pin definitions actually don't go up linearly from 0 to 7:

    #define LCD_PIN_B4      (LCD_PIN_BASE + 5)
    #define LCD_PIN_RW      (LCD_PIN_BASE + 3)
    

    So make sure that all pins are connected correctly. The init sequence should be:

    void display_init()
    {
        lcd_init();
        lcd_enable_4bit_mode(false, false);
        lcd_clear_display();
        lcd_on_off_control(true, false, false);
    }
    
Reply
  • Hi Mark. We do not have the resources to investigate this problem at the moment. I will ask you to try to find out the problem yourself. I noticed in the nrf_hd44780.h file that the pin definitions actually don't go up linearly from 0 to 7:

    #define LCD_PIN_B4      (LCD_PIN_BASE + 5)
    #define LCD_PIN_RW      (LCD_PIN_BASE + 3)
    

    So make sure that all pins are connected correctly. The init sequence should be:

    void display_init()
    {
        lcd_init();
        lcd_enable_4bit_mode(false, false);
        lcd_clear_display();
        lcd_on_off_control(true, false, false);
    }
    
Children
No Data
Related