[En-Nut-Discussion] What is needed for a custom LCD Pinning

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Fri Sep 1 16:02:04 CEST 2006


Hallo,

I have a "standard" 2 line 40 char display connected in a "custom" way to
port pins (data is whole portc, control is porta pin5/6/7).

I renamed cfg/m-can.h to cfg/megacan.h, added a section
#if defined(MEGACAN)
/* MEGACAN special hardware definitions */
#include <cfg/megacan.h>
#endif

in sys/nutconfig.h, changed the Platform Macro to MEGACAN in the
configurator, selected in Nut/OS Components->HD44780 Driver LCD_2x40 and
recompiled Nut.

In my code, I have
#include <dev/hd44780.h>
...
  NutRegisterDevice(&devLcd, 0, 0);
  /*
   * Initialize the LCD.
   */
  if ((lcd = fopen("lcd", "w")) == 0)
    printf("Can't access LCD\n");
  fprintf(lcd, "1234567890123456789012345678901234567890123456789012345678901234567890\n");  
...
while(1)
      NutSleep(500);
      cnt++;
      PORTA = ~cnt;
      PORTB ^=_BV(PORTB4);
      fprintf(lcd, "%d\n", cnt);  
    }


I can see accesses to LCD_RS/LCD_E and LCD_RW, but no characters are
displayed.

Did I miss something?

Thanks
-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------



More information about the En-Nut-Discussion mailing list