Serial Wombat a general-purpose digital interface device for hobbyists, engineers and students |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
WD-C2401P LCD Panel
This is a 24 character LCD panel currently being sold by All Electronics at the super low price of $1.85. If you're already buying a Wombat, you can pick one up at our Ebay store for a slightly higher price, but still save because we combine shipping for free (part available soon...)! These guys want nine bucks for the same part! The Serial Wombat supports this LCD directly. Just tell it through the RS-232 connection which LCD pins are attached to which Wombat pins, and what string to display. It's just that easy. The Wombat also has commands to load custom bitmap characters and to turn the LCD into a 96 level bargraph display. This bargraph can display the state of any of the Wombat's inputs. The Wombat will automatically scroll messages which are longer than 24 bytes. While you're driving this LCD you can also control servos, measure analog inputs, or perform hysteresis control. You can even use this LCD as a 120 level bargraph for one of your analog inputs. This LCD panel has a sticker on the back with the lettering WD-C2401P-1GNNa A81207-1 . This LCD panel uses the Hitachi HD66717 dot-matrix lcd controller. You can get the datasheet for the controller here: And the datasheet for this particular LCD display here: Pros and Cons for the WD-C2401P LCD Panel:
Wiring up your WD-C2401PI couldn't find a connector to fit this LCD's .05 center spacing, so I just soldered right to the pins. The LCD's pins are awfully close together:
So I bent every other one in opposite directions to make them easier to solder.
Soldering them up was a breeze. For newbies, put a bit of solder on each pin, then on each wire. Hold the wire to the pin, then melt them together with the iron. Get an iron with a thin pencil tip and some small diameter solder (.032) at Radio Shack or Fry's Electronics. Don't try to manage with an iron or solder from the hardware store; they're meant for electrical, not electronics work. I like using one color for even numbered pins, one for odd. Makes it easier to hook up later:
Then I cover them up with epoxy so I don't pull them apart or short them together later. Use the Gel kind of epoxy; the other stuff just drips off before it can dry. Be careful not to put epoxy all the way down the connector to the circuit board. The spots where the pins attach to the board can be used later for debugging. Obviously, you want to make sure that all your wires are well soldered and not shorting pins together before you put on the epoxy.
Pinout for the WD-C2401P
Protocol for the Hitachi HD66717 WD-C2401PThe protocol for this LCD is pretty simple. To clock in a byte:1. Set the E line low. 2. Set the RS line high if you're sending data, or low if your sending a command. 3. Set the E line high 4. Put your data on the data lines (DB0 through DB7) 5. Set the E line low. The E line should remain low until you're ready to clock in another byte. If you're using a microcontroller to do this, I'd make sure there was at least a microsecond between all of the above steps, and at least a millisecond between clocked in bytes. This is a long time to wait, but you want to be careful if you're hardwiring the Read/Write line low and not reading the busy status of the LCD. Setting up the LCD to display characters:Clock in the following bytes (cycle the reset line first, if you like):
Putting characters on the screen:Set the RS line high, and clock in a data character. The LCD controller will auto-increment its address. You can then send another character which will be put in the next character location. To reset the address to the first character set the RS line low, then clock in 0xE0.
The Character Set:The characters from 0x20 (space) to 0x7F are standard ASCII. The other characters: 0x00 to 0x0F are reserved for the 4 user-definable bitmaps. 0x00,0x04,0x08 and 0x0C all represent the first user bitmap. 0x10 to 0x17:
0x18 to 0x2F (Note that standard ASCII starts with the space to 0x20):
0x80 to 0x97:
0x98 to 0xAF:
0xB0 to 0xC7:
0xC8 to 0xDF:
0xE0 to 0xF7:
0xF8 to 0xFF:
Custom Characters:The hd66717 allows the user to create up to four custom characters by sending bitmaps for the characters appearance. The custom characters are available as 0x00, 0x01, 0x02, and 0x03 data. I used two custom characters to make a smiley face:
Each character is 5 pixels wide, and 8 pixels tall. When sending bitmaps, send the top line first, followed by the second line, and so on. The five least significant bits of each byte represent the five pixels, with the 2^4 bit representing the leftmost pixel. The upper 3 bits of each byte are unused. A '1' bit represents a black pixel. Pixel data is stored in the character RAM area. To set the pointer to the character RAM area, set the RS pin low, and clock in the byte 0xA0. Then set the RS pin high and clock in between 8 and 32 bytes of data, depending on how many custom characters you want to use (8 bytes for each character). Issue the 0xE0 command above to return to sending data into the standard string buffer. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Copyright Wombat Interface Products, 2006. All Rights Reserved.