Quote Originally Posted by Glenn View Post
Well, since I got some help from you guys with my servoproblems I now have a more or less working routine for that, well, now I wanted to have a LCD to put some debug data to, reading the PBP manual it looks so easy, so I started with building the example in PBP manual:

http://www.melabs.com/resources/pbpm...2-5_35.htm#535

The only change I did was using a 16F628A instead of the 16F84A, therefore I removed the xtal and the two caps.

Then I wrote a very small program like this:

Code:
@ device INTRC_OSC_NOCLKOUT,MCLR_OFF,LVP_OFF,WDT_OFF,PROTECT_OFF
DEFINE OSC 4	' Lets work at 4MHz
CMCON = 7        ' Disable comparators

pause 500          ' grace time for the LCD to initialize.

main:
	LCDOUT $FE, 1, "Hello world" ' Clear display and show text
	pause 1000		          ' Wait 1s
	goto main			   ' Go back
Well, nothing happens.. no sign of text on the LCD, no matter how I adjust the pot.. and I cant see why ?

The LCD is a Sharp LM16A211, which is Hitachi 44780 compatible, and I also have used several of these for other applications so they are ok.
try this
Code:
@ DEVICE INTRC_OSC_NOCLKOUT,MCLR_OFF,LVP_OFF,WDT_OFF,PROTECT_OFF
DEFINE  LCD_COMMANDUS 1000 'Defines how fast PIC sends Data and 
'                          'Commands to LCD change to suit LCD's 
'                          'needs. 
DEFINE LCD_DATAUS 50	     'Define delay time between sending LCD
                           'commands.
                           'Define delay time between data sent.
DEFINE OSC 4	' Lets work at 4MHz
CMCON = 7        ' Disable comparators

pause 500          ' grace time for the LCD to initialize.

main:
	LCDOUT $FE, 1 ' CLEAR LCD
        PAUSE 10
        LCDOUT $FE,2, "Hello world" ' LINE 1 and show text
	pause 1000		          ' Wait 1s
	goto main			   ' Go back
END
I'm not sure about the config statement as I do not use PM assembler anymore