In LCD_INIT, you have to send 0011xxxx to the display 3 times with delays in between before sending Function Set. Review Fig. 24 in the 44780 datasheet. Note that you can't use LCD_OUT for this as that routine (correctly) writes the data byte in 2 nibbles. $ and L have the same LSnibble (x6). Its likely that the display is still in the 8 bit mode due to this problem. I would fix that, and if you still have problems, make sure that in LCD_OUT, PORTD gets first the MSnibble then the LSnibble of any passed byte. You might consider putting a GOTO $+1 between raising and lowering the LCD Enable line to ease r-m-w issues.
As far as ORGs are concerned, JohnP is correct. With no interrupts you only need ORG 0000h. The assembler will build from there. You'll never get to 0004h to GOTO START and you don't need ORG 0030h at all. CBLOCK 0020h is not a factor here - it assigns labels for RAM not program ROM.
Good luck.
As far as ORGs are concerned, JohnP is correct. With no interrupts you only need ORG 0000h. The assembler will build from there. You'll never get to 0004h to GOTO START and you don't need ORG 0030h at all. CBLOCK 0020h is not a factor here - it assigns labels for RAM not program ROM.
Good luck.
Last edited: