Thanks,
I am using ASM code.
but while passing the string like
dt "UPS"
needs any change in the program?
or
it is just the substitute of seperate character.plz clear me.
lcd_init
movlw 0x28 ; 4 bit, 2 Line, 5x7 font
call disp_cmd
call delay
movlw 0x10 ; display shift off
call disp_cmd
call delay
movlw 0x01 ; Clear the Display RAM
call disp_cmd
call delay ; Note, Can take up to 4.1 msecs
movlw 0x06 ; increment cursor
call disp_cmd
call delay
movlw 0x02 ; move the cursor to begining
call disp_cmd
call delay
movlw 0x0C ; display on cursor off
call disp_cmd
call delay
return
;Display command for 4 bit LCD
disp_cmd ; Send the Instruction to the LCD
movwf Temp ; Save the Temporary Value
swapf Temp, w ; Send the High Nybble
bcf LCD_RS ; RS = 0
call nibbleout
movf Temp, w ; Send the Low Nybble
bcf LCD_RS
call nibbleout
return
;------------------------------------------------------------------------------------
;sending ASCII character to LCD
disp_write
addlw '0' ; Send nbr as ASCII character ; Send the Character to the LCD
movwf Temp ; Save the Temporary Value
swapf Temp, w ; Send the High Nybble
bsf LCD_RS ; RS = 1
call nibbleout
movf Temp, w ; Send the Low Nybble
bsf LCD_RS
call nibbleout
return
;sending lower and upper nibble
nibbleout
movwf PORTB
bsf LCD_E
bcf LCD_E
nop
nop
return
movlw 'UPS' ;displayin the string on LCD
call disp_write
can i write like this?plz reply me.
-Raja.
Bookmarks