Hi, I am trying to control an LCD using a shift register. I am using the very successful arduino LiquidCrystal library which is tried and tested but am trying to modify the only function which differs. Instead of writing bytes directly to pins (like in the original function below) I am trying to output using a shift register (also as below). Its good to point out that I do not have d0 to d7 pins but instead a shift register connected to the LCD where d0 = bit 1, d1 = bit 2, .... d7 = bit 8
As for rs, en and rw they are connected directly to the microcontroller so this is straight forward. LCD datasheet here
so technically, if I want to write the value binary 00001011 to d0-d7, using the shift register I should be able to shift out the value decimal 11 however this is not working. Can anyone assist please?
It is not clear whether this is not working in simulation environment (once above schematic seems like drawn on ISIS Proteus) or on assembled circuit. If you have the means to debug, why not just to see what apeears on the shift register?
How are you debugging, step by step with break points? Anyway, define how did you came to the conclusion that it is not working, just by not seeing expected characters on LCD, or checking each command sent to the shift register during simulation?
I am using VisualMicro which allows me to debug however that's as far as I can go without some ideas. I send simple text and no characters show up.
- - - Updated - - -
Here's a suspicion. Could the LCD be damaged if on VEE I supplied 5v? According to the datasheet, VEE should be from 0.3v up to 1.2v. But it says nothing about limits. As in the schematic I connected a trimpot to vary the voltage on VEE and I am certain that it was 5V at one point in time as I was turning it. It is currently set to exactly 1v.
Added: I just recognized it's on pos#1.
So, No, it should not get damaged with VEE = 5V.
I agree, that the datasheet is not like a datasheet should be.
I'm missing:
* absolute maximum ratings
* recommended operating conditions
* timing diagrams
... and so on
I personally like (and use) the Electronic Assembly parts, but the datasheets are really poor.
The display module datasheet should be read together with controller ST7066 documentation which has all the missing information.
I suggest to proceed with the suggestions given by andre_teprom. LCD controller interface is fully static, you can single step through the code and check the shift register operation as well as the correct output of each command byte.
I guess 95% of failing LCD interface codes are due to misunderstanding the protocol requirements, e.g. command timing, soft versus hardware reset.
Hi, Yes while I do agree that it is easy to misunderstand, I am using an existing library as in my first post and only changing the last 2 functions which instead of outputting bits directly to different pins, I am outputting bits to the shift register. I shall try to figure out a way to find out what the shift register is outputting.