I am sorry Nigel
I read your tutorial but still I have not solved the issue.
I am using 16x2 display
Please see the instruction addlw 0xF6
That allows me to count from 1 to 9
but the moment I need to count beyond 9 by changing F6 to another value
I get ascii characters on the display and not 10,11,12........
Please brother help me out on this
Following is my code:
LCD_counter:
movlw 0xCE
movwf PORTD
call SND_CMD
movf counter,0
addlw 0xF6
btfss CARRY
goto LCD2
movlw 0x31
movwf PORTD
call SND_DTA
movlw 0x30
movwf PORTD
call SND_DTA
return
LCD2:
movlw 0x20
movwf PORTD
call SND_DTA
movlw 0x30
addwf counter,W
movwf PORTD
call SND_DTA
return