Help in understanding C-langugage command

Status
Not open for further replies.

somf0872

Member level 5
Joined
Oct 14, 2003
Messages
92
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Activity points
917
c langugage

Can anybody help me out that what does this C-language commands mean :

PORTC &= ~((1<<LCD_RW)|(1<<LCD_E));
PORTC |= ((1<<LCD_RS)|(1<<LCD_E));

I mean ................... I need some explanation on this.

--X--
 

LCD_RW, LCD_E, LCD_RS are bit positions (from 0 to 7) on port C, usually defined by #define preprocessor statement as constants . So if you find constant definitions you will be able to recognise what pin of port C is connected to LCD controll pins .

Statements above do :
first - reset to zero pins pointed by LCD_RW and LCD_E, the rest pins stay unchanged

second - set to one pins pointed by LCD_RS and LCD_E , rest of pins stay unchanged .
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…