I have defined Port B as output port in my code by using TRISB=0.
And by using the command:
@_CONFIG_CONFIG1H_OSC_INTIO67_1H
the internal oscillator is working fine at 8 MHz.
The LCD is now displaying text messages, but when I try to display a numerical value of a variable or a constant, it doesnt show anythin as the screen remains blank.
Please Help !!
DEFINE OSC 8
'******Setting up the LCD display******
DEFINE LCD_DREG PORTB
DEFINE LCD_DBIT 4
DEFINE LCD_RSREG PORTB
DEFINE LCD_RSBIT 0
DEFINE LCD_EREG PORTB
DEFINE LCD_EBIT 1
DEFINE LCD_BITS 4
DEFINE LCD_LINES 2
DEFINE LCD_COMMANDUS 2000
DEFINE LCD_DATAUS 50
@_CONFIG_CONFIG1H_OSC_INTIO67_1H
TRISB=0 'Set Port B as output
PAUSE 1000
LCDOUT $FE, 1
LCDOUT "PIC - LCD Test "
LCDOUT $FE, $C0
STOP





Bookmarks