Wireless Recycled Reef Controller

   Home   |   Recent Edits   |   Search   |   Edit this page



OWLCD - One Wire LCD
The goal is to create a text display for current system info. This way you can see the status much like the Aquacontrollers etc do. I've been working on researching the control and looks pretty do-able. There's several ready-made versions out there that are variations on the theme in Dallas's appnotes for controlling an LCD with the DS2408.

The industry standard LCD is controlled by a Hitachi 44780 controller. It's got a standard interface and command set making them basically interchangable. They can operate in 8 bit mode and also 4 bit mode (which sends the 8 bits in 2 successive "nybles" of 4 bits). All commands are the same between the 2 modes, except that sends them 4 bits at a time.

There's several standard LCD sizes available. All display's under 80 chars are interfaced exactly the same. Common sizes are
[lines x chars]:
08x1 - 08x2
16x1 - 16x2 - 16x4
20x1 - 20x2 - 20x4
40x2
40x4 *actually interfaces as two 40x2 displays - see below

I picked up some 4x40 displays off ebay to play with that are actually 2 controllers that seperate the lines into 2x40 and 2x40. For these displays all the control pins are tied together on the PCB and then there's a second strobe pin. The data pins are read by both and then which ever strobe pin is activated dictates which controller follows the commands. Essentially for the lines 1/2 you write to the data lines and strobe E1 and for lines 3/4 you strobe E2. I intend to use the DS2890 1wire 100k ohm digital pot to direct the strobe pin from the DS2408 to the correct top/bottom strobe of the LCD.

From what I've found, there's several variances out there for using the DS2438 to control an LCD. The main differences are merely in the pinout mapping. For our project we want to use 4-bit mode. Using 8-bit mode actually takes 9 pins to control. The extra pin define's if the bit is a control type command or a character to display at the current position. Using 4 bit mode also allows us the extra pins as general purpouse inputs for switches (advance lines, backlight on/off, etc).

Maxim has an appnote and Schematic with detials on using the DS2408 as an LCD interface, but I think that version is no good. As I said 8-bit mode takes 9 I/O pins and the DS2408 only has 8. They get around this by limiting the chars it can display by throwing out the highest bit ( by permanantly grounding it to logic 0) and using that pin as the control command bit. This means there's literally half the chars available to use (though most the Latin ones are still available) but special chars like the degree symbol and others aren't accessable without the high order bit set to one.

I think the version we want to use is the one by hobby-boards.com or something similar.

Here's some good info I found on LCD interfacing and standards:

  • http://www.myke.com/lcd.htm
  • http://home.iae.nl/users/pouweha/lcd/lcd.shtml
  • http://home.iae.nl/users/pouweha/lcd/lcd0.shtml (interfacing specifically)

    Here's a couple suppliers of ready-made boards for DS2408 / LCD interfacing:
    www.aagelectronica.com TAI8590 1-Wire Text User Interface
    hobby-boards.com LCD1-R1

    The cheapest places I could find for LCD's was either on Ebay.com or www.hnqhlcd.com another place is www.crystalfontz.com - I found they have lots of displays but also higher prices. Many people say they have good products though.


    There's some commands we must issue to initialize the display before writing to it. I've gotten this code snippet that is java but should be easily translated to a shell scrip:

    void prep2display() throws Exception
    set_cmc();
    send_byte((byte)0x03); // Function set
    send_byte((byte)0x03); // Function set
    send_byte((byte)0x03); // Function set
    send_byte((byte)0x02);
    send_char((byte)0x28,false); // Function set 4 bit 2 lines
    send_char((byte)0x0C,false); // Display on
    send_char((byte)0x01,false); // Display Clear
    send_char((byte)0x06,false); // Entry mode Set
    send_char((byte)0x80,false); // Display address 00
    // send_char((byte)0x14,false);



  • Page Hits: 2543