I used the following code while displaying the data to the graphic lcd
movlw 0x80//////cursor position
movwf PORTD
call SND_CMD
movlw 0x35///////data
movwf PORTD
call SND_DTA
The above statements allowed me to display the required pixels on graphic display but that was using the parallel interface to the LCD
But now I have to use serial interface and so I cannot send the entire byte to PORTD
I am not able to figure out how can I display the data as I did before
The command and data subroutines I used for the parallel interface are as follows:
/////PORTB,1--> Data or Command
/////PORTB,2--> RW
/////PORTB,4--> Enable
/////PORTB,5--> Reset
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; WRITE COMMANDS TO LCD
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
SND_CMD:
bcf PORTB,1
bcf PORTB,2
bcf PORTB,5
bsf PORTB,4
nop
nop
nop
nop
bcf PORTB,4
bsf PORTB,5
return
;}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; WRITE DATA TO LCD
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
SND_DTA:
;{
bsf PORTB,1
bcf PORTB,2
bcf PORTB,5
bsf PORTB,4
nop
nop
nop
nop
bcf PORTB,4
bsf PORTB,5
return
If anyone has an idea, please let me know
Thanks
movlw 0x80//////cursor position
movwf PORTD
call SND_CMD
movlw 0x35///////data
movwf PORTD
call SND_DTA
The above statements allowed me to display the required pixels on graphic display but that was using the parallel interface to the LCD
But now I have to use serial interface and so I cannot send the entire byte to PORTD
I am not able to figure out how can I display the data as I did before
The command and data subroutines I used for the parallel interface are as follows:
/////PORTB,1--> Data or Command
/////PORTB,2--> RW
/////PORTB,4--> Enable
/////PORTB,5--> Reset
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; WRITE COMMANDS TO LCD
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
SND_CMD:
bcf PORTB,1
bcf PORTB,2
bcf PORTB,5
bsf PORTB,4
nop
nop
nop
nop
bcf PORTB,4
bsf PORTB,5
return
;}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; WRITE DATA TO LCD
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
SND_DTA:
;{
bsf PORTB,1
bcf PORTB,2
bcf PORTB,5
bsf PORTB,4
nop
nop
nop
nop
bcf PORTB,4
bsf PORTB,5
return
If anyone has an idea, please let me know
Thanks
Last edited: