Jinx & I write: > > >lcd_init movlw 0x30 > > > movwf portd > > > bcf rs > > > bcf rw > > > bsf en > > > nop > > > bcf en > > > > Are rs, rw & en on the same port? Personally I like a nop between them > > if so to avoid the famous RMW bug. (feature?) Fredrik asked: >RMW bug? Please explain that to a newbie. A RMW operation is when you do, say a BCF or BSF on a port pin. The PIC actually reads the old port value in (not the output latch, but the actual pins), changes the specified bit, then writes the new value out to the port. Most of the time this is fine. The problem occurs if you do consecutive BCF or BSF operations on the same port. What happens is that the first RMW changes a port pin's level but due to capacitance on the port pin, it takes (a small but finite) time to get to the new level. If it hasn't got to the correct level before the next RMW operation, the old (wrong) level may get read in and therefore used as part of output value for that operation. Clear as mud? :-) An example: start ;00000000 all bits low to start with BSF port,0 ;00000001 bit 0 starts going high but is slow due to capacitance BSF port,1 ;00000010 bit 1 goes high but bit 0 set low again due to RMW ! I hope this helps. I think the PIC data sheets mention about RMW operations. Regards... -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.