??? 04/23/07 16:30 Read: times |
#137829 - Contrast and Initialization Responding to: ???'s previous message |
Jayanth Kumar said:
my initial program is i posted displays the characters on the first line only with good, readable contrast. its not a problem with the contrast. i want to know if my crystal oscillator on 16MHz is causing a problem with the initialisation.
jayanth Your first code probably does not initialize correctly for a two line display so you are operating at (1/8) duty cycle which results in the contrast being readable. The second code initializes correctly for a two line display operating at (1/16) duty cycle, which is why is less readable or dimmer. This is why you need a variable resistor for the contrast. With the 16MHz you will need to increase the number of loops in the delay routines, unless you use a timer. Use the flow chart I posted, make sure the delay times are met, and put a variable resistor on the contrast. Format and comment your code. Jon |