From: Joao B. <bon...@ya...> - 2011-12-04 20:07:40
|
So I downloaded the source code from svn and started looking at the HD44780 driver. I did a small change in there and now I get all 20 characters on line 1 to display. But a widget in line 2 won't display at all. Also, as text in widget 1 changes, it will wrap into line 2. Basically, I changed this line in the goto() function into this: drv_HD_command(currController, (0x80 | 15), T_EXEC); The changes I made in drv_HD44780.c are: static int drv_HD_goto(int row, int col) { int pos, controller; /* handle multiple controllers */ for (pos = 0, controller = 0; controller < numControllers; controller++) { pos += CROWS[controller]; if (row < pos) { currController = (1 << controller); break; } row -= CROWS[controller]; } /* column outside of current display's width */ if (col >= CCOLS[controller]) return -1; if (0) { debug("goto: [%d,%d] mask=%d, controller=%d, size:%dx%d", row, col, cur$ CROWS[controller], CCOLS[controller]); } /* 16x1 Displays are organized as 8x2 :-( */ if (CCOLS[controller] == 16 && CROWS[controller] == 1 && col > 7) { row++; col -= 8; } if (Capabilities & CAP_HD66712) { /* the HD66712 doesn't have a braindamadged RAM layout */ pos = row * 32 + col; } else { /* 16x4 Controllers use a slightly different layout */ if (CCOLS[controller] == 16 && CROWS[controller] == 4) { pos = (row % 2) * 64 + (row / 2) * 16 + col; } else { pos = (row % 2) * 64 + (row / 2) * 20 + col; } } /* drv_HD_command(currController, (0x80 | pos), T_EXEC); */ drv_HD_command(currController, (0x80 | 15), T_EXEC); /* return columns left on current display */ return CCOLS[controller] - col; // return 20; } static void drv_HD_write(const int row, const int col, const char *data, const $ { printf(" %s len is %d\n", data , len); int space = drv_HD_goto(row, col); if (space > 0) { drv_HD_data(currController, data, len > space ? space : len, T_EXEC); } /* JLB - cusor was blinking */ drv_HD_command(allControllers, 0x0c, T_ONOFF); } Can anybody help on this? Thanks ________________________________ From: Joao Bonina <bon...@ya...> To: "lcd...@li..." <lcd...@li...> Sent: Thursday, 1 December 2011, 2:07 Subject: Re: [lcd4linux] HD44780 20x2 only shows 8 characters Can anybody give me some hints on how to to debug this? ________________________________ From: Joao Bonina <bon...@ya...> To: "lcd...@li..." <lcd...@li...> Sent: Tuesday, 29 November 2011, 22:46 Subject: [lcd4linux] HD44780 20x2 only shows 8 characters Hello, I'm trying a new lcd display, this time a CrystalFontz CFAH2002Y-PDI-ET (HD44780 compatible). The problem is that it only shows 8 characters on line 1. If I send it more than 8 characters, nothing will show. Also, can't get any widget to display on line 2. the log and conf file are: 0# lcd4linux -Fvvq -f lcd4linux.conf LCD4Linux 0.11.0-SVN-1092 starting Dump of lcd4linux.conf: Display 'HD44780-20x2' Display:HD44780-20x2.Bits 8 Display:HD44780-20x2.Driver 'HD44780' Display:HD44780-20x2.Model 'generic' Display:HD44780-20x2.Port '/dev/parport0' Display:HD44780-20x2.Size '20x2' Display:HD44780-20x2.UseBusy 0 Display:HD44780-20x2.Wire.ENABLE 'STROBE' Display:HD44780-20x2.Wire.ENABLE2 'GND' Display:HD44780-20x2.Wire.GPO 'GND' Display:HD44780-20x2.Wire.RS 'AUTOFD' Display:HD44780-20x2.Wire.RW 'INIT' Layout 'Default' Layout:Default.Row1.Col1 'Make' Layout:Default.Row2.Col1 'Make2' Variables.counter 0 Variables.tick 2000 Widget:Make.align 'R' Widget:Make.class 'Text' Widget:Make.expression 'i1234567' Widget:Make.update tick Widget:Make.width 20 Widget:Make2.align 'R' Widget:Make2.class 'Text' Widget:Make2.expression 'i5867' Widget:Make2.update tick Widget:Make2.width 20 Widget:Time.active counter < 100 Widget:Time.class 'Timer' Widget:Time.expression counter = counter+1 Widget:Time.update 2000 plugin_cfg.c: Variable counter = '0' (0) plugin_cfg.c: Variable tick = '2000' (2000) [DBus] Error connecting to the dbus session bus: /usr/bin/dbus-launch terminated abnormally without any error message lcd4linux.c: initializing driver HD44780 HD44780: $Rev: 1066 $ HD44780: using model 'generic' HD44780: using parallel port HD44780: using 1 Controller(s) HD44780: using 8 bit mode udelay: using gettimeofday() delay loop HD44780: using ppdev /dev/parport0 HD44780: wiring: DISPLAY:RS - PARPORT:AUTOFD (Pin 14) HD44780: wiring: DISPLAY:RW - PARPORT:INIT (Pin 16) HD44780: wiring: DISPLAY:ENABLE - PARPORT:STROBE (Pin 1) HD44780: wiring: DISPLAY:ENABLE2 - PARPORT:GND HD44780: wiring: DISPLAY:ENABLE3 - PARPORT:GND HD44780: wiring: DISPLAY:ENABLE4 - PARPORT:GND HD44780: wiring: DISPLAY:BACKLIGHT - PARPORT:GND HD44780: wiring: DISPLAY:GPO - PARPORT:GND HD44780: wiring: DISPLAY:GPI - PARPORT:GND HD44780: wiring: DISPLAY:POWER - PARPORT:GND HD44780: timing: CY = 1000 ns (default) HD44780: timing: PW = 450 ns (default) HD44780: timing: AS = 140 ns (default) HD44780: timing: AH = 20 ns (default) HD44780: timing: INIT1 = 4100 us (default) HD44780: timing: INIT2 = 100 us (default) HD44780: timing: EXEC = 80 us (default) HD44780: timing: WRCG = 120 us (default) HD44780: timing: CLEAR = 2250 us (default) HD44780: timing: HOME = 2250 us (default) HD44780: timing: ONOFF = 2250 us (default) HD44780: not using busy-flag checking HD44780: using 0 GPI's and 0 GPO's initializing layout 'Default' layout.c: Layout:Default: migrating 'row1.col1' to 'Layer:1.row1.col1' layout.c: Layout:Default: migrating 'row2.col1' to 'Layer:1.row2.col1' Creating new timer group (2000 ms) widget 'Make': Class 'text', Parent '<root>', Layer 1, Row 0, Col 0 (to 0,20) widget 'Make2': Class 'text', Parent '<root>', Layer 1, Row 1, Col 0 (to 1,20) lcd4linux.c: starting main loop Conf file is: Variables { tick 2000 counter 0 } Display HD44780-20x2 { Driver 'HD44780' Model 'generic' UseBusy 0 Port '/dev/parport0' Size '20x2' Bits 8 Wire { RW 'INIT' RS 'AUTOFD' ENABLE 'STROBE' ENABLE2 'GND' GPO 'GND' } } Widget Make { class 'Text' expression 'i1234567' width 20 align 'R' update tick } Widget Make2 { class 'Text' expression 'i5867' width 20 align 'R' update tick } Widget Time { class 'Timer' expression counter = counter+1 active counter < 100 update 2000 } Layout Default { Row1 { Col1 'Make' } Row2 { Col1 'Make2' } Display 'HD44780-20x2' Layout 'Default' Will appreciate your help. Kind regards, Joao ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d _______________________________________________ Lcd4linux-users mailing list Lcd...@li... https://lists.sourceforge.net/lists/listinfo/lcd4linux-users ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d _______________________________________________ Lcd4linux-users mailing list Lcd...@li... https://lists.sourceforge.net/lists/listinfo/lcd4linux-users |