koky
Full Member level 2
I have found this source, but i don't understand why is used movlw (1<<LCRW)
what is the result ? why is not used a real value?
LCEN equ 1 ;rb1
LCRW equ 2; rb2
LCRS equ 3;rb3
tst_lcd_busy
movlw (1<<LCRW)
movwf PORTB
waitbusy
bsf PORTB,LCEN ; get hi-Nibble
rlf PORTB,w ; Busy-flag to Carry
bcf PORTB,LCEN
bsf PORTB,LCEN ; get lo-Nibble
bcf PORTB,LCEN
btfsc STATUS,C ;
goto waitbusy ;
return
what is the result ? why is not used a real value?
LCEN equ 1 ;rb1
LCRW equ 2; rb2
LCRS equ 3;rb3
tst_lcd_busy
movlw (1<<LCRW)
movwf PORTB
waitbusy
bsf PORTB,LCEN ; get hi-Nibble
rlf PORTB,w ; Busy-flag to Carry
bcf PORTB,LCEN
bsf PORTB,LCEN ; get lo-Nibble
bcf PORTB,LCEN
btfsc STATUS,C ;
goto waitbusy ;
return