data shown on LCD not working correctly

Thread Starter

RG23

Joined Dec 6, 2010
304
When the value of count321 is 2,

"I have to make the cursor blink when I am on line1 and same if cursor is on line 2"

Rich (BB code):
label733:////////////////used to check if cursor is on line 1 or 2
        btfsc  usereg,2  
        goto   label753///////if cursor is on line2
        incf   count320,1
        movf   count320,0
        sublw  d'1'
        btfsc  STATUS,Z
        call   label730////////////to make the cursor blank
        movf   count320,0
        sublw  d'2'
        btfsc  STATUS,Z
        call   label731////////////to make the cursor solid
        return
 
label730:
        movlw  d'1'
        movwf  count320
        movlw  0x8F
        movwf  PORTD
        call   SND_CMD////////brings the cursor to line 1 last position 
        movlw  0x20
        movwf  PORTD
        call   SND_DTA///////displays blank on line 1 last position 
        return
 
label731:
        movlw  d'0'
        movwf  count320
        movlw  0x8F///////////////////brings the cursor to line 1 last position 

        movwf  PORTD
        call   SND_CMD
        movlw  0x3C///////displays solid cursor on line 1 last position 

        movwf  PORTD
        call   SND_DTA
        return
 
//////////same procedure above I repeat for line 2 also
 
label753:///////////same approach as label733 for line1
        incf   count320,1
        movf   count320,0
        sublw  d'1'
        btfsc  STATUS,Z
        call   label750
        movf   count320,0
        sublw  d'2'
        btfsc  STATUS,Z
        call   label751
        return
         
label750://///////:///////////same approach as label730 for line1
        movlw  d'1'
        movwf  count320
        movlw  0xCF
        movwf  PORTD
        call   SND_CMD
        movlw  0x20
        movwf  PORTD
        call   SND_DTA
        return
label751:://///////:///////////same approach as label731 for line1

        movlw  d'0'
        movwf  count320
        movlw  0xCF
        movwf  PORTD
        call   SND_CMD
        movlw  0x3C
        movwf  PORTD
        call   SND_DTA
        return
 
When the value of count321 becomes 3, I call label734 to repeat the process
 
label734:
        movlw d'1'
        movwf count321
        return
Now the problem I am facing is when count321 becomes 3;
I need to make the cursor solid irrespective of whether I am in line 1 or 2 blank mode.

It didn't work for me though.

If anyone has an idea please let me know

Thanks
 
Last edited by a moderator:
Top