Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'kscholte'@'localhost' (using password: YES) in /data/webroot/hosting/kscholte/linuxguru.be/httpdocs/php/opendb.php on line 3

Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'www-data'@'localhost' (using password: NO) in /data/webroot/hosting/kscholte/linuxguru.be/httpdocs/php/opendb.php on line 4

Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in /data/webroot/hosting/kscholte/linuxguru.be/httpdocs/php/opendb.php on line 4

Error encountered... Please try again.

Project LinuxGURU - An Open Source Home Automation System
Tutorials
  Lights
  Switches
  Temp Meters
  Lights Meters
  Infra Red
  Voice Feedback
  Light Dimmer
  Alarm
  Motion Detect
  LCD's


Forum
  Software
  Hardware
  Circuits
  Components
  Ideas
  General


Software
  Light on/off/sw
  Wake-up
  Sleep-mode
  Alarm
  Wall Switch
  LIRC examples
  WinAmp Control


Personal
  Preferences
  Inbox
  Add diary event
  Add news event


Thanks to i-Vision
for the free hosting
SiteMeter


Warning: include() [function.include]: URL file-access is disabled in the server configuration in /data/webroot/hosting/kscholte/linuxguru.be/httpdocs/index.php on line 31

Warning: include(http://www.linuxguru.be/banners/banner.php) [function.include]: failed to open stream: no suitable wrapper could be found in /data/webroot/hosting/kscholte/linuxguru.be/httpdocs/index.php on line 31

Warning: include() [function.include]: Failed opening 'http://www.linuxguru.be/banners/banner.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /data/webroot/hosting/kscholte/linuxguru.be/httpdocs/index.php on line 31

 

Interfacing LCD's

Intro

Interfacing a LCD is not that tough to do, so we'll try to explain how to interface and use it for the GURU project.

Parts

  • 1 Liquid Crystal Display (LCD) [BUY]
    You need a HD44780 or compatible chip
  • 1 diode - 1N4004
  • 1 male DB25 connector
  • 1 NPN Transistor - BC547
    You'll only need this one if you want to turn on/off the backlight using your computer
  • 1 resistor - 1k ohm
    Also for backlight control

Display's we're using.

Schema & Hardware

LCD Schematics

If you don't need to control the backlight with your pc, you can ignore the circuit between pin 17 of the parallel port and pin 16 from the LCDisplay. In this case you can connect pin 16 of the LCD directly to GND.

You probably also don't want to use the 20k-pot meter since it's not useful anyway. You can connect pin 3 directly to GND for full font intensity


Software

Under construction

But for now you can use lcd-0.1.tar.gz to test the display.


Some technical information

pin 4 (Register Select): Activate for writing characters or keep it low when writing to control registers.

pin 5 (Read/Write): When activated the display is set to read, when low you can write to the display. Since you probably only write to the LCD, you could connect it to the +5Vdc power supply.

pin 6 (Enable): Used to latch the datapins 7-14 into the LCD. The display latches on the falling edge of the signal, so you've to drop it low, or since it's connected to the nStrobe signal of the parallel port, we have to activate the Strobe signal (which is bit 0 on the Control port).

Programming:

RS R/W B7 B6 B5 B4 B3 B2 B1 B0

0  0   0  0  0  0  0  0  0  1        Clear Display

0  0   0  0  0  0  0  0  1  X        Return Home

0  0   0  0  0  0  0  1  D  S        Entry Mode Set
                                     D: 0=direction -, 1=direction +
                                     S: 0=no shift, 1=shift
0  0   0  0  0  0  1  D  C  B        Display on/off
                                     D: 0=disply off, 1=on
                                     C: 0=cursor off, 1=on
                                     B: 0=blink off, 1=on

0  0   0  0  0  1  S  R  X  X        Display or Cursor Shift
                                     S: 0=cursor only, 1=both
                                     R: 0=left; 1=right

0  0   0  0  1  D  N  F  X  X        Set data interface
                                     D: 0=4 bit, 1=8 bit
                                     N: 0=1-line display, 1=2-line display
                                     F: 0=5x7 dots, 1=5x10 dots

0  0   0  1  A  A  A  A  A  A        Set char gen RAM address
                                     Lets you select one of 64
                                     chars for loading a bit map

0  0   1  A  A  A  A  A  A  A        Set display RAM address
                                     Lets you select an address
                                     in the display buffer.  With
                                     this you can write in a pos-
                                     ition that is off the viewable
                                     display.

0  1   B  A  A  A  A  A  A  A        Read busy flag, address pointer
                                     If B=1, display is updating.
                                     Also returns address of last
                                     data transfer.


1  0   D  D  D  D  D  D  D  D        Write Data
                                     Writes to Display if previous
                                     instruction was SET DISPLAY
                                     RAM ADDR.  Writes to char gen if
                                     previous instruction was SET
                                     CHAR GEN RAM ADDR.

1  1   D  D  D  D  D  D  D  D        Read Data
                                     Reads from Display if previous
                                     instruction was SET DISPLAY
                                     RAM ADDR.  Reads from char gen if
                                     previous instruction was SET
                                     CHAR GEN RAM ADDR.


Login
Login:
Pass:
New user   Lost password


News

Warning: mysql_query() [function.mysql-query]: Access denied for user 'www-data'@'localhost' (using password: NO) in /data/webroot/hosting/kscholte/linuxguru.be/httpdocs/inc/news_menu.php on line 11

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /data/webroot/hosting/kscholte/linuxguru.be/httpdocs/inc/news_menu.php on line 11

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /data/webroot/hosting/kscholte/linuxguru.be/httpdocs/inc/news_menu.php on line 14




Diary

Warning: mysql_query() [function.mysql-query]: Access denied for user 'www-data'@'localhost' (using password: NO) in /data/webroot/hosting/kscholte/linuxguru.be/httpdocs/inc/diary_menu.php on line 10

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /data/webroot/hosting/kscholte/linuxguru.be/httpdocs/inc/diary_menu.php on line 10

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /data/webroot/hosting/kscholte/linuxguru.be/httpdocs/inc/diary_menu.php on line 13