replaced the PIND in lcd_read_byte.

Usage of other ports then PORTD is now possible
This commit is contained in:
Sebastian Schumb (softwerker 2009-06-11 16:13:10 +02:00
parent 671d966944
commit 8cfc118052
2 changed files with 3 additions and 2 deletions

View File

@ -120,7 +120,7 @@ uint8_t i,data;
lcd_rs_low();
lcd_rw_high();
_delay_us(1);
data = (uint8_t) PIND;
data = (uint8_t) LCD_DATA_PIN;
lcd_en_low();
LCD_DATA_DDR = 0xFF;
}

View File

@ -44,7 +44,8 @@
#define LCD_DATA PORTD //!< Port used for data
#define LCD_DATA_DDR DDRD //!< Data-Direction-Register for Data
#define LCD_DATA_PIN PIND //!< Port used for reading the data
#define LCD_DATA_DDR DDRD //!< Data-Direction-Register for data
// Macros for (un)setting the control pins
#define lcd_rs_high() (LCD_CTRL |= (1 << LCD_RS)) //!< Set the Register-Select pin high