electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

what (1<<LCRW) mean ?


Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> what (1<<LCRW) mean ?
Author Message
koky



Joined: 12 May 2001
Posts: 156
Helped: 3
Location: Italy


Post30 Apr 2006 23:44   

what (1<<LCRW) mean ?


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
Back to top
Google
AdSense
Google Adsense




Post30 Apr 2006 23:44   

Ads




Back to top
BeeBop



Joined: 19 Feb 2006
Posts: 161
Helped: 15


Post01 May 2006 1:51   

Re: what (1<<LCRW) mean ?


Hi Koky,
I may be wrong here, but, are you sure that is not (LCRW<<1) which means shift reg defined as LCRW (2) left one bit?
Regards,
Robert
Back to top
koky



Joined: 12 May 2001
Posts: 156
Helped: 3
Location: Italy


Post01 May 2006 10:49   

Re: what (1<<LCRW) mean ?


is : movlw (1<<LCRW)

and the software work, but i don't like use sw with strange assembler, i prefer rewrite it in more readable system
Back to top
dragan



Joined: 08 Apr 2001
Posts: 55
Helped: 3


Post01 May 2006 11:59   

Re: what (1<<LCRW) mean ?


THIS IS A PROGRAMED SHIFT.Shift 1 left for a value writed in LCRW.It is a common use in a IAR C compiler.
EG: /* Enable receiver and transmitter */
UCSR0B = (1<<RXEN)|(1<<TXEN);
/* Set frame format: 8data, 2stop bit */
UCSR0C = (1<<USBS)|(3<<UCSZ0);
}



Greetings
Dragan
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> what (1<<LCRW) mean ?
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
what does these words mean & what should i do? (2)
What is mean by antipad? (1)
what do these mean? (3)
what is loading mean? (1)
What is HW & SW co-design mean? (8)
what do u mean by chip characterization ? (5)
what is specman tick mean? (8)
What do u mean by cascade circuit? (10)
What does MF & OS mean? (8)
0.18 um technology - what does it mean (30)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS