johankj
New Member
Nigel Goodwin said:OK, so you're setting it to 2 line mode then!.
However, instead of writing each command seperately, it makes much more sense to do it in a subroutine, like this example from my tutorials:
Yes, I will put that in a subroutine. But when I'm debugging, I tend to simplify as much as I can, and then optimise. Sorry for that...
So, I've probably initialised the LCD correctly. Let me just run the DDRAM addresses by you:
DDRAM is initially at zero DDRAM address.
Code:
...
MOVLW b'1100000' ; Set DDRAM Address 40h (Line 2)
...
MOVLW b'10010100' ; Set DDRAM Address 14h (Line 3)
...
MOVLW b'11010100' ; Set DDRAM Address 54h (Line 4)
...
mcs51mc said:Do you send a "Display On/Off Control" command with D=1, C=1 and B=0 (Display: On ; Cursor: On ; Blink: Off) see page 24 of datasheet?
If not, what you see isn't the cursor but some spookie thing because of I don't know what (yet)
Yes, did that, and it's set for two lines...
BTW, I'm more of a binary guy myself