some 4 line LCDs have 2 44780s and an E line for each one. Then you need to init both. I think they typically have one 44780 controlling lines 1 and 3 and then the other controlls 2 and 4. kind of odd and quirky but if you hide it behind library routines it doesn't hurt too much. lol
Here is the code I always use. It's for 8051 but it's the idea that matter. Translate it (error free) to PIC code and if it doesn't work you have a great chance that your problem is hardware related... ... ...over to the PIC guys overhere
You will find 2 subroutines and code for the main program. The "Delay" thing is a preset value for a counter in a 10ms based timer interrupt routine. This ISR decrement "Delay" when it's not zero.
Only after these routines you can use the Busy flag.
some 4 line LCDs have 2 44780s and an E line for each one. Then you need to init both. I think they typically have one 44780 controlling lines 1 and 3 and then the other controlls 2 and 4. kind of odd and quirky but if you hide it behind library routines it doesn't hurt too much. lol
Take a look at the datasheet you posted, only the 4*40character display has 2 E-lines. Since Dan use a 4*16char we don't have to worry about this.
But if you look to the addresses of a 4*16char LCD you will see that line 3 is a continuation of line 1.
If your LCD is not well initialized, the 44780 assumes it has to control only one line and only lines 1 and 3 on the LCD react with dark dots, something Dan already encountered.
^^doh! its in assembly. I'm trying to get this to work in C so it can mesh w/ the rest of my program. I did get it pretty much working using the assembly in Nigel's tutorials. i got real characters, etc and a counting number.
i'll try to translate your init sequence to C and see what happens. thanks
man, im about to throw this damn thing out the window. i just did the whole seiko power up sequence bit by bit. however whenever i run the ICD2 debugger and step through the sequence my lower bits never change!
they work exactly as they should when using the MPLAB SIM to debug.
i checked possible conflicts and the only thing that could override my TRISD settings is if the parallel slave port was on. This is enabled w/ TRISE<4> and i'm sure its set to 0! both debuggers show it as 0 (off).
@DanD: Don't forget to first open the window before throwing anything to it, you might get it back in your face
Can you share some code with us, maybe you just overlook something...
I can't help you on PIC hardware stuff since I never used one, but I can asure you that the code I posted works for all 8051 based projects I've made so far.