I'm trying to figure out the problem with my LCD and resistors. The micro I'm using is AT89S52 and the LCD is a standard display based on the HD44780 chipset.
Part of the code in my micro allows for the output lines P1.0 and P1.1 to be configured in any combination so I tested all combinations and noticed only two things. One contrast setting, and completely blank display.
The completely blank display is normal with P1.0 and P1.1 being high. But it seems all other combinations return the exact same brightness intensity even though the resistor values are different.
The only thing I could possibly contribute the problem to is the age of some resistors. At a local shop, the resistors are probably 40+ years old because sometimes when I look at them the leads are not shiny silver. They're dull-ish silver and the markings are not vivid and bending them is not super easy. The resistors I order online seem brand new: shiny leads, vivid markings, nicely coloured, etc. In all cases, the resistors are carbon film with 5% tolerance according to the markings.
Does age make the resistor value out of spec?
Also, My tests were done with a regulated 5.5V power (brand new 9V battery passing through a LM2940 regulator).
The reason why I use this setup is because I want to enable the dark setting (P1.0 and P1.1 = low) when the battery is almost dying (circuit voltage under 4.2V) and when the battery is brand new (circuit voltage at 5.5V), I want to enable only the light setting (P1.1 = low and P1.0 = high) and when the battery is sort-of new then I want the medium setting (P1.0 = low and P1.1 = high)
So does resistor age cause my problem, or are the values of my resistors not optimal? and is 5% carbon OK? or must I use 1% metal film?