AVR LCD is blank after code change
Time to elaborate on my original comment...

You seem to be misunderstanding the part that the left shift operator (&lt;&lt;) the bitwise OR operator (|) play in setting bits. You can use the OR operator to set a bit to 1, but you cannot use it to reset a bit to 0. For example, in your code:

PORTC|=(0&lt;&lt;RW);                // read mode  PC1=RW


...you seem to be trying to reset the RW bit in PORTC to 0, but that is not what will happen with the above code. Since RW is defined as 1, 0&lt;&lt;1 will be compiled as "0 shifted left by 1 bit" (i.e. multiplied by 2) which is still just 0. Then you OR that 0 to the contents of PORTC resulting in no change to PORTC. That is, if PORTC bit 1 was on, it will still be on after the above is executed.  

Assuming that what you really want to do is reset bit 1 (RW) of PORTC to 0 leaving all others the same, then that can be done by using the AND operator:

PORTC &amp;= (255 - (1&lt;&lt;RW));


Personally, given the confusion this is causing you, I would recommend simply defining and using RW (and other bits) as follows:

//     Bit:  76543210
#define RS 0b00000001
#define RW 0b00000010
#define EN 0b00000100

PORTC |= RW;            // Turn on the RW bit
PORTC &amp;= 255 - RW;      // Turn off the RW bit


To me that is clearer anyway. Alternatively, if you really want to work with bit position numbers, you could hide the bit-level acrobatics in a macro as follows:

#define biton(port,bitnum) port |= (1 &lt;&lt; bitnum)
#define bitoff(port,bitnum) port &amp;= 255 - (1 &lt;&lt; bitnum)

biton(PORTC,RW);
bitoff(PORTC,RW);