This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void LCD_write(uint8_t d) { | |
// ILI9341 reads data pins when WR rises from LOW to HIGH (A1 pin on arduino) | |
PORTC = PORTC & B11111101; // WR 0 | |
// data pins of ILI9341 connected to two arduino ports | |
PORTD = (PORTD & B00000011) | ((d) & B11111100); | |
PORTB = (PORTB & B11111100) | ((d) & B00000011); | |
PORTC = PORTC | B00000010; // WR 1 | |
} |