Hello! i wanna ask how to control LCD.
using mega128
here problem occurred.
From the lab board i was practicing, here RS, RW, E pin was connected to PORTC.
but to control BLCD motor, i had to design motor drive.
so making PCB I changed RS, RW, E pin from PORTC to PORTF.
and i changed main header file code of course.
#define LCD_RS_0 PORTF.5 = 0
#define LCD_RS_1 PORTF.5 = 1
#define LCD_RW_0 PORTF.6 = 0
#define LCD_RW_1 PORTF.6 = 1
#define LCD_E_0 PORTF.7 = 0
#define LCD_E_1 PORTF.7 = 1
and [the first argument of the '.' operator must be of 'struct' or 'union' type] comes up.
i found out that PORTF is not used this way.
and again
#define LCD_RS_0 PORTF &= ~0x20
#define LCD_RS_1 PORTF |= 0x20
#define LCD_RW_0 PORTF &= ~0x40
#define LCD_RW_1 PORTF |= 0x40
#define LCD_E_0 PORTF &= ~0x80
#define LCD_E_1 PORTF |= 0x80
no error signal.
but still HD44780 LCD doen't work.
there is two file, it looks related to LCD control
lcd.h and lcd_control.c
no matter how i look at this code,
it seems that i can control it with the pins redefined in main header file.
Whats is it unhappy with?
Thank you for reading..