My search of a couple of past forum discussions didn't find a solution for interfacing the BASIC Stamp to an LCD unit that utilizes the Samsung KS0066 controller. Actually what I have is a 4x40 parallel LCD (CM404-1), with two of these controllers (one for each of 2x40 segments). I've successfully gotten the Stamp to communicate with a similar 4x40 LCD that uses the more common Hitachi HD44780 controller, but the same code does not apply. As "compatible" as they may be stated as being, there appears to be some differences. My Research found a datasheet for the KS0066 and it is in there that I learned that the initialization sequence is a bit different. But I am still failing to get anything but garbage to print on the display. The problem seems to be that it is not successfully getting the command to switch to 4 bit mode, the method that I am using for the other LCD as well. What I DO get is the screen to clear and a cursor in the upper left corner. I can even send LCDOUT commands to move the cursor across the screen. My suspicion is that because these commands are lower in value (on the LSB side of a byte), that I'm only successful with them because the MSB nibble is getting chopped off. The controller appears to still be looking for an 8 bit instruction instead of two 4 bit instructions. Determining the correct pinouts was another challenge as they were not stated as correct on the company's website. It is always possible that my 4 data line pins are not 100% correct, but I get nothing when I install them where several datasheets say to connect them. I'm thinking I wouldn't be able to execute cursor movement commands if my data lines were incorrect.
I've had good success with serial LCDs, but cannot find them in 4x40 size. If the packages were smaller, I'd contemplate sitting two 4x20 side by side, but the circuit boards and bezels on the LCD keep the actual displays from lining up close to one another.
I'd like to know if anyone has had success with this controller and what the trick was. I seem to be getting real close to getting it to work, but need that extra piece of information that I'm not seeming to come up with as yet. It powers up fine, I get the two dark lines on lines 1 and 3 and I have the contrast POT working fine. LCDOUT commands can produce results, but they are random characters, but consistent in each experiment.
Any advice appreciated.