Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top