> After building several neat projects with the LCD, I realized that 11 > I/O lines for the LCD doesn't leave much room for other gadgets to > connect to the PIC, which only has 13 I/O lines. I looked back at the > data sheet and the app note again, but they told me nothing. Now > (Hoping that this won't be the third problem) for the question: Can > anyone out there help me get this @%$#% thing working in the 4-bit > transfer mode? I would like source code for the 16F84. To use the LCD in 4-bit-transfer mode, you need to connect the four data wires to D4-D7 on the LCD. Each data transfer then consists of either two 4-bit reads or two 4-bit writes (the high nybble is written first). No delay is required after writing the first part, but a 40us delay is needed after writing the second (for clear-screen or reset-scroll commands, the required delay is 1.6ms) There are a few traps you need to beware of. First of all, you need to have a way to "get in sync" with the display (in case, e.g., the PIC gets reset mid-transfer). This is done by sending a "switch to 8-bit mode" command repeatedly. Since the top 4 bits are sufficient to identify that command, the display will eventually be switched into that mode. Next, you need to send a "switch to 4-bit mode" command. Note that this command will be seen by the display as an 8-bit command. You must, however, only send it once and it must be preceded (and followed) by at least 40us delay. Once all this is accompished, then you may do whatever you want with the display, using two 4-bit transfers for each operation. Note that if you wish to save pins, you may wire R/W low. If you do this, you won't be able to read status from the display but that normally won't be a problem; the gain of an I/O pin will often be worth the extra delays required when accessing the display.