RPi 2 with HD44780 (Solved)


23 posts
by dopplerdefekt » Fri Feb 13, 2015 8:02 pm
Hi all,

I used to work with the previous version of the RPi B, now i got me a new one so i have a little more power coming out of it.

So, i wanted to connect my HD44780 lcd, which i succesfully used on the B, on the new one but it doesn't work!
The only thing that changed is that i used to have raspbmc running. Now i have raspbian with the same drivers and config files.
Even the setup on the GPIO pins i just copied 1-on-1 but still my lcd shows 2 fully lit bars and no text information or whatsoever...

The tutorial i followed with my first Pi was this one:
http://www.boeeerb.co.uk/pi-lcd/

I was assured that the Pi 2 was fully compatible with the older Pi B (and the B+) so i think i must have done something wrong...
Since i checked and double checked the wiring and the config and still can't find any error, maybe there is someone here who can help me...

With kind regards,

Erwin

**Edit:

For everyone who lands on this topic after searching for the solution i was after for, use the file that Paul Webster posted on the LCDproc forum at SourceForge (http://ehc.ac/p/lcdproc/patches/21/#b8f3)
And make sure when you use the tutorial i gave earlier that the ConnectionType has to be 'raspberrypi' and not 'rpi'

Now just let us hope that LCDproc listens to it and adds the patch to the final builds.
Last edited by dopplerdefekt on Sat Mar 21, 2015 2:19 pm, edited 1 time in total.
Posts: 7
Joined: Fri Feb 13, 2015 7:47 pm
by FTrevorGowen » Sat Feb 14, 2015 4:52 pm
dopplerdefekt wrote:Hi all,
I used to work with the previous version of the RPi B, now i got me a new one so i have a little more power coming out of it.
So, i wanted to connect my HD44780 lcd, which i succesfully used on the B, on the new one but it doesn't work!
The only thing that changed is that i used to have raspbmc running. Now i have raspbian with the same drivers and config files.
Even the setup on the GPIO pins i just copied 1-on-1 but still my lcd shows 2 fully lit bars and no text information or whatsoever...
The tutorial i followed with my first Pi was this one:
http://www.boeeerb.co.uk/pi-lcd/
I was assured that the Pi 2 was fully compatible with the older Pi B (and the B+) so i think i must have done something wrong...
Since i checked and double checked the wiring and the config and still can't find any error, maybe there is someone here who can help me...
With kind regards,
Erwin

What software (drivers, language) are you using? Loosely speaking, the GPIO-pins "appear at different addresses" on the Pi 2 and you will need an updated version. (For example, I had to re-install an updated version of wiringPi for my own 'C' demonstration code to work)**
Trev.
** As shown here:
http://www.cpmspectrepi.webspace.virgin ... lPi2B.html
(I do have other examples, but haven't yet updated my external webpages)
Usually running Raspbian Jessie on up to 13 Pi's (an A, B1, 2xB2, 2xB+, A+, P2B, 3xP0, P3B, P0W). See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm
User avatar
Forum Moderator
Forum Moderator
Posts: 3928
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
by dopplerdefekt » Sat Mar 14, 2015 4:37 pm
Hi Trevor,

It has been a while since i had the chance to get a look in to the forum, been out at sea for a while...

I used LCDproc to sent data to the display... straight from the repo...

I happened to have the C source code of the HD44780 driver wich i used on the old B...
Please tell me, what you mean with 'appear at different adresses'

Code: Select all
/** \file server/drivers/hd44780-rpi.c
 * \c 4bit connection type of \c hd44780 driver for Hitachi HD44780 based LCD displays.
 *
 * The LCD is operated in its 4 bit-mode to be connected to the gpio pins on the Raspberry Pi.
 */

/** Copyright (c) 2012 Paul Corner <paul_c@users.sourceforge.net>
 *        2000, 1999, 1995 Benjamin Tse <blt@Comports.com>
 *        2001 Joris Robijn <joris@robijn.net>
 *        1999 Andrew McMeikan <andrewm@engineer.com>
 *        1998 Richard Rognlie <rrognlie@gamerz.net>
 *        1997 Matthias Prinke <m.prinke@trashcan.mcnet.de>
 *
 * Based in part on the hd44780-4bit driver and comments/notes/code provided
 * by Serac (RaspberryPi forum user)
 *
 * This file is released under the GNU General Public License. Refer to the
 * COPYING file distributed with this package.
 */

/**
 * The code to access the gpio on a Raspberry Pi draws on an
 * example program dated 15-January-2012 by Dom and Gert van Loo:
 * How to access GPIO registers from C-code on the Raspberry-Pi

 * The default connections are:
 * header (gpio)  LCD
 * P1-12 (18)     D7 (14)
 * P1-16 (23)     D6 (13)
 * P1-18 (24)     D5 (12)
 * P1-22 (25)     D4 (11)
 * P1-24 (8)     EN (6)
 * P1-26 (7)     RS (4)
 *
 * Mappings can be set in the config file using the key-words:
 * ENABLE, RS, D7, D6, D5, D4 in the [HD44780] section.
*/

#define D7 18
#define D6 23
#define D5 24
#define D4 25
#define RS 7
#define EN 8

/**
 *
 * RW (5) on the LCD MUST be hard wired low to prevent 5V logic appearing
 * on the gpio pins.
 *
 * Only a single LCD is currently supported - That may change along with
 * i2c connected devices.
 */


#include "hd44780-rpi.h"
#include "hd44780-low.h"
#include "port.h"
#include "report.h"

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <dirent.h>
#include <fcntl.h>
#include <assert.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>

// Generally, any function that accesses the LCD control lines needs to be
// implemented separately for each HW design. This is typically (but not
// restricted to):
// HD44780_senddata
// HD44780_readkeypad

void lcdrpi_HD44780_senddata(PrivateData *p, unsigned char displayID, unsigned char flags, unsigned char ch);

// To be implemented at some point if required..
void lcdrpi_HD44780_backlight(PrivateData *p, unsigned char state);
unsigned char lcdrpi_HD44780_readkeypad(PrivateData *p, unsigned int YData);

static volatile unsigned int *gpio_map = NULL;

static int setup_io(Driver *drvthis)
{
   void *gpio_mem;
   int  mem_fd = 0;
   /* open /dev/mem */
   if (gpio_map != NULL) {
      report(RPT_ERR, "IO already in use.");
      return -1;
   }
   if ((mem_fd = open("/dev/mem", O_RDWR|O_SYNC) ) < 0) {
      report(RPT_ERR, "can not open /dev/mem");
      return -1;
   }

   if ((gpio_mem = malloc(BLOCK_SIZE + (PAGE_SIZE-1))) == NULL) {
      report(RPT_ERR, "memory allocation error");
      return -1;
   }

   if ((unsigned int)gpio_mem % PAGE_SIZE)
      gpio_mem += PAGE_SIZE - ((unsigned int)gpio_mem % PAGE_SIZE);

   gpio_map = (unsigned int *)mmap((caddr_t)gpio_mem,
         BLOCK_SIZE, PROT_READ|PROT_WRITE,
         MAP_SHARED|MAP_FIXED, mem_fd, GPIO_BASE);

   if ((long)gpio_map < 0) {
      report(RPT_ERR, "mmap error %d", (int)gpio_map);
      return -1;
   }
   close(mem_fd); // Done with mem_fd and don't need to use it again.

    return 0;
}

      /* gpio pins 3, 5, 27 available on S5 */
static const int gpio_pins[] = {  0,  1, -1, -1,  4, -1, -1,  7,
              8,  9, 10, 11, -1, -1, 14, 15,
             -1, 17, 18, -1, -1, 21, 22, 23,
      /* 8-31 accessible via board-id resistors R3-R10 */
             24, 25, -1, -1, -28, -29, -30, -31 };

static int setup_gpio(int gpio)
{
   volatile int i;

   if (gpio > 31 || gpio_pins[gpio] < 0) {
      printf("%s: Invalid gpio pin %i - Mapped to %i\n",
            __FUNCTION__, gpio, gpio_pins[gpio]);
      return -1;
   }

      printf("%s: gpio pin %i - Mapped to %i\n", __FUNCTION__, gpio, gpio_pins[gpio]);


   *(gpio_map+0x0025) &= ~3;
   /*  After writing to the GPPUD register, need to wait
       150 cycles as per p101 BCM2835.pdf. The following
       while loop uses approx five instructions plus another
       two to load the counter.
       Note: the int must be volatile or gcc will optimise
       loop out. */
   i=30; while (--i); // need a 150 cycle min wait
   *(gpio_map+0x0026+(gpio/32)) = 1<<(gpio%32);
   // Another 150 cycle wait required after a write to GPPUDCLK
   i=30; while (--i);
   *(gpio_map+0x0025) &= ~3;
   *(gpio_map+0x0026+(gpio/32)) = 0;
   *(gpio_map+(gpio/10)) = (*(gpio_map+(gpio/10))&~(7<<((gpio%10)*3)))|(1<<((gpio%10)*3));
   return 0;
}

static void cleanup_io(PrivateData *p)
{

   INP_GPIO(p->rpi_gpio->enable);
   INP_GPIO(p->rpi_gpio->rs);
   INP_GPIO(p->rpi_gpio->d7);
   INP_GPIO(p->rpi_gpio->d6);
   INP_GPIO(p->rpi_gpio->d5);
   INP_GPIO(p->rpi_gpio->d4);
   munmap((caddr_t)gpio_map, BLOCK_SIZE);
   free(p->rpi_gpio);
   return;
}

/**
 * Initialize the driver.
 * \param drvthis  Pointer to driver structure.
 * \retval 0       Success.
 * \retval -1      Error.
 */
int
hd_init_rpi(Driver *drvthis)
{
   PrivateData *p = (PrivateData*) drvthis->private_data;

   if (setup_io(drvthis) < 0) {
      report(RPT_ERR, "Failed to set up gpio.");
      return -1;
   }

   p->rpi_gpio = malloc(sizeof(struct rpi_gpio_map));
   if (p->rpi_gpio == NULL) {
      report(RPT_ERR, "%s: unable to allocate memory", drvthis->name);
      return -1;
   }

   p->rpi_gpio->enable = drvthis->config_get_int(drvthis->name, "EN", 0, EN);
   p->rpi_gpio->rs = drvthis->config_get_int(drvthis->name, "RS", 0, RS);
   p->rpi_gpio->d7 = drvthis->config_get_int(drvthis->name, "D7", 0, D7);
   p->rpi_gpio->d6 = drvthis->config_get_int(drvthis->name, "D6", 0, D6);
   p->rpi_gpio->d5 = drvthis->config_get_int(drvthis->name, "D5", 0, D5);
   p->rpi_gpio->d4 = drvthis->config_get_int(drvthis->name, "D4", 0, D4);

   if (p->rpi_gpio->enable == p->rpi_gpio->rs ||
         p->rpi_gpio->enable == p->rpi_gpio->d7 ||
         p->rpi_gpio->enable == p->rpi_gpio->d6 ||
         p->rpi_gpio->enable == p->rpi_gpio->d5 ||
         p->rpi_gpio->enable == p->rpi_gpio->d4 ||
         p->rpi_gpio->rs == p->rpi_gpio->d7 ||
         p->rpi_gpio->rs == p->rpi_gpio->d6 ||
         p->rpi_gpio->rs == p->rpi_gpio->d5 ||
         p->rpi_gpio->rs == p->rpi_gpio->d4 ||
         p->rpi_gpio->d7 == p->rpi_gpio->d6 ||
         p->rpi_gpio->d7 == p->rpi_gpio->d5 ||
         p->rpi_gpio->d7 == p->rpi_gpio->d4 ||
         p->rpi_gpio->d6 == p->rpi_gpio->d5 ||
         p->rpi_gpio->d6 == p->rpi_gpio->d4 ||
         p->rpi_gpio->d5 == p->rpi_gpio->d4) {
      report(RPT_ERR, "Can not use the same GPIO pin twice\n");
      return -1;
   }

   if (setup_gpio(p->rpi_gpio->enable) ||
         setup_gpio(p->rpi_gpio->rs) ||
         setup_gpio(p->rpi_gpio->d7) ||
         setup_gpio(p->rpi_gpio->d6) ||
         setup_gpio(p->rpi_gpio->d5) ||
         setup_gpio(p->rpi_gpio->d4)) {
      report(RPT_ERR, "Invalid GPIO specified\n");
      return -1;
   }

   p->hd44780_functions->senddata = lcdrpi_HD44780_senddata;
   // Next two are stubbed functions.
   p->hd44780_functions->backlight = lcdrpi_HD44780_backlight;
   p->hd44780_functions->readkeypad = lcdrpi_HD44780_readkeypad;
   p->hd44780_functions->close = cleanup_io;

   // setup the lcd in 4 bit mode
   p->hd44780_functions->senddata(p, 0, RS_INSTR, /*FUNCSET | IF_8BIT*/ 0x33);
   p->hd44780_functions->uPause(p, 4100);
   p->hd44780_functions->senddata(p, 0, RS_INSTR, /*FUNCSET | IF_4BIT*/ 0x32);
   p->hd44780_functions->uPause(p, 150);

   common_init(p, IF_4BIT);

   return 0;
}


/**
 * Send data or commands to the display.
 * \param p          Pointer to driver's private data structure.
 * \param displayID  ID of the display (or 0 for all) to send data to.
 * \param flags      Defines whether to end a command or data.
 * \param ch         The value to send.
 */
void
lcdrpi_HD44780_senddata(PrivateData *p, unsigned char displayID, unsigned char flags, unsigned char ch)
{

   if (displayID > 1) {
      return;
   }
   if (gpio_map == NULL) {
      printf("gpio not set up.\n");
      return;
   }
   if (flags == RS_INSTR) {
                SET_GPIO(p->rpi_gpio->rs, 0);
   }
   else { // flags == RS_DATA
                SET_GPIO(p->rpi_gpio->rs, 1);
   }
   // Clear data lines ready for nibbles
   SET_GPIO(p->rpi_gpio->d7, 0);
   SET_GPIO(p->rpi_gpio->d6, 0);
   SET_GPIO(p->rpi_gpio->d5, 0);
   SET_GPIO(p->rpi_gpio->d4, 0);

   p->hd44780_functions->uPause(p, 50);

   // Output upper nibble first
   SET_GPIO(p->rpi_gpio->d7, (ch & 0x80));
   SET_GPIO(p->rpi_gpio->d6, (ch & 0x40));
   SET_GPIO(p->rpi_gpio->d5, (ch & 0x20));
   SET_GPIO(p->rpi_gpio->d4, (ch & 0x10));

   p->hd44780_functions->uPause(p, 50);

   // Data is clocked on the falling edge of EN
   SET_GPIO(p->rpi_gpio->enable, 1);
   p->hd44780_functions->uPause(p, 50);
   SET_GPIO(p->rpi_gpio->enable, 0);
   p->hd44780_functions->uPause(p, 50);

   // Do same for lower nibble
   SET_GPIO(p->rpi_gpio->d7, 0);
   SET_GPIO(p->rpi_gpio->d6, 0);
   SET_GPIO(p->rpi_gpio->d5, 0);
   SET_GPIO(p->rpi_gpio->d4, 0);
   p->hd44780_functions->uPause(p, 50);
   SET_GPIO(p->rpi_gpio->d7, (ch & 0x08));
   SET_GPIO(p->rpi_gpio->d6, (ch & 0x04));
   SET_GPIO(p->rpi_gpio->d5, (ch & 0x02));
   SET_GPIO(p->rpi_gpio->d4, (ch & 0x01));
   p->hd44780_functions->uPause(p, 50);

   SET_GPIO(p->rpi_gpio->enable, 1);
   p->hd44780_functions->uPause(p, 50);
   SET_GPIO(p->rpi_gpio->enable, 0);
   p->hd44780_functions->uPause(p, 50);

   return;
}


/**
 * Turn display backlight on or off.
 * \param p      Pointer to driver's private data structure.
 * \param state  New backlight status.
 */
void lcdrpi_HD44780_backlight(PrivateData *p, unsigned char state)
{
   return;
}


/**
 * Read keypress.
 * \param p      Pointer to driver's private data structure.
 * \param YData  Bitmap of rows / lines to enable.
 * \return       Bitmap of the pressed keys.
 */
unsigned char lcdrpi_HD44780_readkeypad(PrivateData *p, unsigned int YData)
{
   return 0;
}
Posts: 7
Joined: Fri Feb 13, 2015 7:47 pm
by joan » Sat Mar 14, 2015 4:55 pm
Find where GPIO_BASE is defined and change the value from 0x20xxxxxx to 0x3Fxxxxxx for the Pi2.
User avatar
Posts: 12686
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK
by dopplerdefekt » Sat Mar 14, 2015 5:37 pm
Finally getting somewhere... Thanks! Now i know where i'm searching for...

Will check in later!
Posts: 7
Joined: Fri Feb 13, 2015 7:47 pm
by dopplerdefekt » Fri Mar 20, 2015 1:13 pm
Hi all,

So i found where i was looking for in the 'hd44780-rpi.h' file

Code: Select all
#ifndef HD_LCDRPI_H
#define HD_LCDRPI_H

#include "lcd.h"                 /* for Driver */

// initialise this particular driver
int hd_init_rpi(Driver *drvthis);

/* rpi_map is addcessed through the hd44780_private_data struct.
    Data stored here is used for mapping physical GPIO pins to
    BCM2835 gpio */
struct rpi_gpio_map {
   int enable;
   int rs;
   int d7;
   int d6;
   int d5;
   int d4;
};


#define BCM2708_PERI_BASE        0x20000000
#define GPIO_BASE                (BCM2708_PERI_BASE + 0x200000) /* GPIO controller */

#define PAGE_SIZE (4*1024)
#define BLOCK_SIZE (4*1024)

#define INP_GPIO(g) *(gpio_map+((g)/10)) &= ~(7<<(((g)%10)*3))
#define SET_GPIO(g,a) *(gpio_map+(a?7:10))=1<<(g%32);

#endif // HD_LCDRPI_H


I changed it to

Code: Select all
#define BCM2708_PERI_BASE        0x3F000000
#define GPIO_BASE                (BCM2708_PERI_BASE + 0x3F0000) /* GPIO controller */


Will try to build now...
Posts: 7
Joined: Fri Feb 13, 2015 7:47 pm
by rpdom » Fri Mar 20, 2015 1:24 pm
dopplerdefekt wrote:Hi all,

So i found where i was looking for in the 'hd44780-rpi.h' file


I changed it to

Code: Select all
#define BCM2708_PERI_BASE        0x3F000000
#define GPIO_BASE                (BCM2708_PERI_BASE + 0x3F0000) /* GPIO controller */


Will try to build now...

That won't work.

Only the BCM2708_PERI_BASE address has changed. The GPIO_BASE is an offset from that value and should still be 0x200000.
User avatar
Posts: 10822
Joined: Sun May 06, 2012 5:17 am
Location: Essex, UK
by Paul Webster » Fri Mar 20, 2015 2:21 pm
Check the patch that I put in Sourceforge for LCDProc.
It makes the code dynamically handle being on RPI1 or RPI2.
Still not been committed but have had a few people give feedback that it worked for them (but not aware of anyone trying it with Kodi).
User avatar
Posts: 665
Joined: Sat Jul 30, 2011 4:49 am
Location: London, UK
by dopplerdefekt » Fri Mar 20, 2015 6:30 pm
So...

First i tried the easy way...
Downloaded Paul Websters prebuild hd44780.so file, put it in /usr/lib/lcdproc/... The following error came up:

Code: Select all
hd44780: unknown ConnectionType: rpi
Driver [hd44780] init failed, return code -1
Could not load driver hd44780
There is no output driver
Critical error while initializing, abort.


Using the sources files, editted the hd44780-rpi.h file with the 0x3F000000 adress at the PERI_BASE (Leaving GPIO_BASE at 0x20000000) and build the entire LCDproc package resulted in the same error...

What is going wrong?
Posts: 7
Joined: Fri Feb 13, 2015 7:47 pm
by dopplerdefekt » Sat Mar 21, 2015 1:55 pm
Found it!

Code: Select all
ConnectionType=rpi


should be

Code: Select all
ConnectionType=raspberrypi


So simple... LCDd now starts without errors, but LCD is still showing 2 lit bars :roll:
In my world, nothing goes easy... A well, that where i am a rookie for 8-)
Posts: 7
Joined: Fri Feb 13, 2015 7:47 pm
by dopplerdefekt » Sat Mar 21, 2015 2:12 pm
Thanks to my expirimenting one of the connectors was damaged... Took a new wire and washed the pig (dutch saying, don't know a proper english one)
Posts: 7
Joined: Fri Feb 13, 2015 7:47 pm
by trex_daemon » Mon Jan 25, 2016 11:53 am
Actually I've found also an additional issue, and would like to clarify if it's ok to change it as I did:
-there is a constant table foar each of the revisions:
gpio_pins_R1 and gpio_pins_R2
I've used GPIO16 for one of the data buses, and it wasn't working.
After debugging, I've found that the check_pin() function is using the 2 tables to determine if the selected pin can be used.
It looks like pin 16 was disabled as the gpio_pins_R2 array had -1 on that position.
After uptating the table to
static const int gpio_pins_R2[GPIO_PINS] = {
-1, -1, -1, 3, 4, -1, -1, 7,
8, 9, 10, 11, -1, -1, 14, 15,
16, 17, 18, -1, 20, 21, 22, 23,
/* 28-31 accessible via P5 */
24, 25, -1, 27, 28, 29, 30, 31
};

(in addition to GPIO16 also 20 and 21 was added to the allowed list) now the LCD is driven correctly.
My question is, what was the reason to disable also these GPIO ports ? They don't seem to have any additional 'features'...
Posts: 7
Joined: Fri Jan 15, 2016 9:18 am
by digital.arts » Thu Feb 18, 2016 11:27 pm
Dear trex_deamon,

can you help me, please ?
I have only openelec as os, so i can't compile an own version of the driver, with your changes (with enabled gpios, like 16,20,21).
It would be very kind, if you can compile one "special" hd44780.so for RasPi2, with enabled gpios 13,16,19,20,21,26
and send it to my email...
You can get a very big thankyou, if you can do this :D

best regards
Karl
Posts: 5
Joined: Thu Feb 18, 2016 10:58 pm
by trex_daemon » Fri Feb 19, 2016 6:10 am
I've attached the drier and also the 2 C files that needs to be modified.
I hope that the 2 environments will be compatible, openelec and osmc..
Tell me if it works.
Attachments
driver.zip
(36.87 KiB) Downloaded 185 times
Posts: 7
Joined: Fri Jan 15, 2016 9:18 am
by digital.arts » Fri Feb 19, 2016 1:01 pm
Hi trex_deamon,

thank you for the really fast response...i will try it at home.

best regards
Karl
Posts: 5
Joined: Thu Feb 18, 2016 10:58 pm
by digital.arts » Fri Feb 19, 2016 10:56 pm
Hi trex_deamon,

ok, your "special" driver-file works, tested on RasPi2 with openelec 6.0.1
But now i want to try the "compilation" for myself, because of enabeling/disabeling some other gpio's...
My steps i've already done:
1. load actual wheezy-image and install it
2. load the sourcecode of lcdproc with wget http://sourceforge.net/projects/lcdproc ... z/download -O lcdproc.tar.gz
3. expanded the package with tar xzf lcdproc.tar.gz
4. switch to the directory and replaced two files with your new files (..rpi.c and ...rpi.h)
5. configured the process with ./configure --enable-drivers=hd44780
6. do the "make"

A lot of messages are shown on the console output... but after the finish i can't find the new"hd44780.so" driver file...
Can you give me some hints ? Do i any mistakes at the "build-process" ? Where is the result ?
Thanks again for your help !

best regards
Karl
Posts: 5
Joined: Thu Feb 18, 2016 10:58 pm
by trex_daemon » Sat Feb 20, 2016 9:26 am
Well, a lot of messages showing up unfortunately tells nothing.
Did you see any error messages after running configure ?
Especially at the step where it checks for available dependencies ? If you see, then you should install those dependencies first.
Afterwards, if this step completes without error, you should run the make to actually build the lcdproc binary and the enabled drivers.
Here, you should leave it running, but after it completes, check the last few lines. If you see some kind of error (not warning) then you should consult this.
If there is no error , then the build was successful.
In this case, the LCDd binary shall lie in the /server subfolder, while the .so file shall be in the /server/drivers subfolder.
It' easy to spot as it has executable rights.
Posts: 7
Joined: Fri Jan 15, 2016 9:18 am
by digital.arts » Sat Feb 20, 2016 2:15 pm
Hi trex_deamon,

THANK YOU ! You make my day :D
There where no errors, i just don't have seen the compiled driver... opened my eyes - and here it is ...
Tumbs up for your kindness and helpful hints.
Now i have my own special driver, with the needed gpio's enabled .

best regards and a nice weekend !

Karl
Posts: 5
Joined: Thu Feb 18, 2016 10:58 pm
by trex_daemon » Sat Feb 20, 2016 4:48 pm
You're welcome!
Could you post the updated files so maybe somebody who has access to the lcdproc repo can commit it so that it will work flawlessly on the RPI2 ?
Posts: 7
Joined: Fri Jan 15, 2016 9:18 am
by digital.arts » Sat Feb 20, 2016 5:48 pm
Hi,
i'm not sure, if my file (i only needed and used the compiled hd44780.so) is helpful for others...
My "Main-RasPi" is with Openelec, which has a "readonly" Core, and the LCDd binary is already part of this...
The only thing to change is the driver (hd44780.so) and ofcourse the LCDd.conf / LCD.xml .
I took your hd44780-rpi.c, changed the default gpios for my case, disabled some gpios (the SPI ones), enabled the others (gio 12-27 and 28-31) so they can maybe used with the parameters in the .conf file...

But i'm sure, if someone needs such a driver, he can make it on his own, with the hints and posts of this thread ;)

Bye
Karl
(greetings from Bavaria - Prost! :lol: )
Attachments
hd44780.zip
(31.96 KiB) Downloaded 190 times
Posts: 5
Joined: Thu Feb 18, 2016 10:58 pm
by trex_daemon » Sun Feb 21, 2016 5:56 am
Well, it's good to have the binary, as it's not so easy to build from sources. It took me 2 weeks until I've figured out that it was using the default ports instead of those defined by me. It was interesting, as as soon as i was starting the lcdproc, the gpio IR receiver stopped working.. Then measured the pins with a scope and saw that it's writing on the gpio pin the IR receiver uses.. So I' ve started looking at the code and in the end I've found the problem :)
Greetings from Romania!
Cheers!
Posts: 7
Joined: Fri Jan 15, 2016 9:18 am
by hyung » Sat Feb 27, 2016 10:21 pm
Dear Karl and trex_deamon,

I am trying to configure 16*2 LCD for raspberry pi 2 Volumio. I followed Karl's procedure with trex_deamon's files but I could not expand the lcdproc tar.gz after downloading the lcdpro.tar.gz. When I expand the file, I had the error messsage below.

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now

Could you guide me how to proceed?

I am a beginner, so it would be very helpful, if you could guide me step by step. Please help me.

Thank you very much in advance.

Best,

Hyung
Posts: 1
Joined: Sat Feb 27, 2016 9:58 pm
by srwilson58 » Sun Mar 06, 2016 6:46 pm
Seems I can't get this going.

Has anyone gotten this to work on a Raspberry pi 2 running Jessie? If so, can someone please walk me through the procedure?

Thanks in advance!
Posts: 1
Joined: Sun Mar 06, 2016 6:38 pm