Date: Fri, 18 Jul 1997 20:33:13 -0500 From: Todd Peterson To: Mot-68HC11-Apps@freeware.mcu.motsps.com Subject: Re: pin assignments (LCD Hookup) At 07:13 PM 7/18/97 -0400, you wrote: >Hi everyone, I recently received a keypad and display from Digi-Key. I >was trying to connect the display to the MC68HC11 for my project. However >I was unable to decipher some pins that the datasheet describes. The >display is the DMC-16433 from Digi-Key. It has the following pin >assignments on the data sheet. I don't know where to connect pins 3,4,5, >and 6. to the pin assignments on the 60-pin MC68HC11 I/O Connector P1. >Can someone help me decipher this?..Thanks. I've clipped the data specs: > >PIn Assmt symbol level function >1 Vss - 0 V (GND) >2 Vcc - Power Supply pos 5V >3 Vee - for LGD Drive >4 RS H/L Register Select signal Register H: Data Input > Select L: Instruction Input > >5 R/W H/L H: Data Read (Module -> MPU) L: Data Write > (Module -> MPU) >6 E H,H -> L Enable Signal (NO pull-up Resistor) >7 DB0 H/L >8 DB1 H/L >9 DB2 H/L All these others are Data Bus Line >10 DB3 H/L >11 DB4 H/L >12 DB5 H/L > >13 DB6 H/L These did not show on the data sheet >14 DB7 H/L but I am assuming they are the same as the other > ones > You are correct about pins 13 and 14. Pin 3 is the contrast; put it on the wiper of a pot valued about 5-10K, with the other two pins on +5V and Ground. Pin 4 is a data input pin that determines whether the byte being sent to the LCD is character data or instruction data. Pin 5 determines whether or not data is being written to the LCD or if it is being read from it. Pin 6 determines if the LCD is receiving (like a 'chip enable' signal on an IC. The appropriate sequencing is shown in the datasheet. Make sure to pay close attention to timing requirements; this causes alot of people trouble. If the I/O or timing demands of LCD displays are too much of a burden on your system, you might take a look at our EDE700 Serial to LCD Interface IC. It has only one input pin, and takles care of the entire LCD interface automatically. Serial 2400/9600 Baud data that is written to the EDE700 is automatically displayed on the LCD. It also gives features such as entire-line scrollup and data readback in addition to supporting left/right shifting and custom character generation. Works great for must any LCD display. A datasheet detailing hookup & usage can be obtained from our web site in the 'Integrated Circuits' section under 'EDE700'. We're at: http://www.netins.net/showcase/elab Good luck getting things going! -Todd Peterson E-Lab Digital Engineering, Inc. "Embedded Control & Integrated Circuit Solutions" EDE300 IC - Stamp I/O Expander & PC Interface IC EDE700 IC - Serial to LCD Interface IC EDE1200 IC - Stepper Motor Controller EDE1400 IC - Serial to Parallel-Printer IC http://www.netins.net/showcase/elab Date: Sat, 19 Jul 1997 00:51:47 -0700 From: Mark Schultz To: Mot-68HC11-Apps@freeware.mcu.motsps.com Subject: Re: pin assignments At 07:13 PM 7/18/97 -0400, you wrote: >Hi everyone, I recently received a keypad and display from Digi-Key. I >was trying to connect the display to the MC68HC11 for my project. However >I was unable to decipher some pins that the datasheet describes. The >display is the DMC-16433 from Digi-Key. It has the following pin >assignments on the data sheet. I don't know where to connect pins 3,4,5, >and 6. to the pin assignments on the 60-pin MC68HC11 I/O Connector P1. >Can someone help me decipher this?..Thanks. I've clipped the data specs: Ok - I've used these displays before. First thing that I will mention is that although these modules provide what looks like a standard microprocessor bus interface they are VERY SLOW and thus I would not advise connecting it to the 'HC11 memory bus (assuming you are using external memory); rather, the various control signals, including the DB0..DB7 lines should be connected to I/O ports. The Vee signal line (pin 3) provides the 'field' voltage for the LCD (?) and can be used to control the display contrast. The easiest way to handle this pin is to connect it to the wiper position of a 5-10K pot, with the CW and CCW pins tied to Vcc & Vss respectively. The pot can then be used to control display contrast. One possible variation (which I've never tried) would be to use one of the timer outputs to implement a PWM DAC which may allow for software-controlled display contrast. Register select (RS, pin 4) should be connected to a output port pin on the MCU. When high, data written to the DBn pins is interpreted as character data to be displayed (usually in sequential left-to-right positions as data is written). When low, DBn data is interpreted as a display control command; typical uses would be to clear the display, set the cursor position and visibility, and initiate a programmable character pattern download. Read/Write (RW, pin 5) controls the direction of transfers over the DBn lines and should be connected to a MCU output line. A typical application will usually only WRITE data or commands to the display module (RW=Low) but the display can be read as well, to obtain character data being displayed or the current cursor position. I also recall that the display's activity status (ready or busy processing commands) can be checked when RW=Low, but I don't recall offhand how this works. I think that DB7 indicates the module 'busy' status when RW=Low, RS=Low and E=High. The enable signal (E, pin 6) determines if the display is selected for operations or deselected. Although originally intended as a data bus synchronization signal (much like the E-line on the 'HC11) it's primary use in a 'modern' high bus speed application is as a 'chip select'. When E is low, the display will ignore all activity on the DBn lines (as well as RW and RS). When high, these pins will respond as described above. This pin should be connected to an output port and used as a 'data valid' strobe (see below). DB0 through DB7 form a 8-bit bidirectional data bus that is used to transfer data (characters to display) and commands to and from the display module. These lines should ideally be tied to a 8-bit bidirectional I/O port (such as Port C if you are using a HC11 in single-chip mode or expanded mode with a 'HC24 PRU). You could also connect them to a memory-mapped 8-bit bidirectional latch if you are short on I/O pins. As mentioned before, character-mode LCD modules based around the venerable Hitachi LCD controller chipset (these include those sold by Digi-Key) are relatively SLOW devices. Setup and hold times MUST be observed for them to work properly. When writing data to the module, assert the appropriate levels on DB0..DB7, RS and RW with the E line inactive (low). Wait 1 microsecond (minimum), assert the E signal, wait 1 more microsecond, then unassert E. Once the module has accepted a command or data byte it may take up to 30 MILLIseconds (maybe more?) for the display to complete processing, esp. in the case of a 'clear display' or 'initialize' command. Another tidbit recalled from memory - I seem to recall that the Hitachi character LCD controller has a 4-bit operating mode that allows commands and data to be sent to the module using only 4 of its 8 data lines. I believe that DB4..DB7 are used as data lines in this case, and DB0..DB3 are grounded. Commands and data are sent/received using two LCD 'bus cycles' instead of one. This mode may be useful if I/O pins are at a premium. One final caveat: I'm writing this 'from memory' and as such may have gotten one or two things wrong. I have the complete data sheet & specs on these modules somewhere in my databook collection but unfortunately most of said collection is still in boxes (I moved recently). If I happen to run across my LCD data sheets this weekend I'll look them over and post a revised version of this message here again, as it seems that there are a number of people who have asked about these modules recently. Good luck... Mark Date: Wed, 6 Aug 1997 16:36:46 -0500 (CDT) From: Todd Peterson To: pics@parallaxinc.com Subject: Re: [PICS] LCD Display Question At 02:50 PM 8/6/97 -0500, you wrote: >I have a 20char by 2 line LCD display with the Hitachi chip. The problem >is I can't seem to the the second line to display anything. When I adjust >the contrast knob, only the 1st line gets dark. However, when I turn off >power, garbage is often displayed on both the first and second lines. Is >the second line of this display fried, or do I need to make some type of >adjustments? Thanks. Shawn, The 2x20 uses the same controller as the 2x40, so to get to the second line you'll either need to send twenty dummy characters or tell the cursor to jump to that address. Details of the LCD are explained in our EDE700 LCD Interface IC Datasheet in the 'Integrated Citcuits' section of our web site at: http://www.netins.net/showcase/elab -Todd Peterson E-Lab Digital Engineering, Inc. "Embedded Control & Integrated Circuit Solutions" EDE300 IC - Stamp I/O Expander & PC Interface IC EDE700 IC - Serial to LCD Interface IC EDE1200 IC - Stepper Motor Controller EDE1400 IC - Serial to Parallel-Printer IC http://www.netins.net/showcase/elab