(Noob question) Placing parts of a byte in different (parts of) registers
This

#define GLCD_IO_DATA_OUTPUT(data)       PORTD |= (data &amp; 0b11111100);\
                                          PORTC |= (data &amp; 0b00000011)


is wrong because eventually, bits 2-7 of PORTD and 0 &amp; 1 of PORTC will be one.  You need to mask off the relevant bits to zero, and then OR things in:

#define GLCD_IO_DATA_OUTPUT(data) \
    PORTD = ((PORTD &amp; 0x00000011) | (data &amp; 0b11111100));\
    PORTC = ((PORTC &amp; 0x11111100) | (data &amp; 0b00000011))


Note that you may want to make a PORT_D_MASK and a PORT_C_MASK.