Download Print this page

NEX ROBOTICS Fire Bird V ATMEGA2560 Software Manual page 91

Robotic research platform
Hide thumbs Also See for Fire Bird V ATMEGA2560:

Advertisement

NEX Robotics
After the initialization of LCD in 4-bit mode is complete, then for sending the data in nibbles
there is no need of providing any delay between two nibbles of same byte, the most significant
nibble (higher 4-bits) is sent first, immediately followed by the least significant nibble (lower 4-
bits).
For more details on the LCD, refer to "hd44780u.pdf" in the folder "datasheet" in the
documentation CD.
6.1 Functions used for the LCD display
Note: All the functions are defined in the lcd.c file. It is located inside the "Experiments" folder
inside the documentation CD.
6.1.1 LCD port configure (called inside the "port_init()" function)
void
lcd_port_config (void)
{
DDRC = DDRC | 0xF7;
PORTC = PORTC & 0x80;
}
6.1.2 Setting LCD in 4 bit mode
void
lcd_set_4bit()
{
_delay_ms(1);
cbit(lcd_port,RS);
cbit(lcd_port,RW);
lcd_port = 0x30;
sbit(lcd_port,EN);
_delay_ms(5);
cbit(lcd_port,EN);
_delay_ms(1);
cbit(lcd_port,RS);
cbit(lcd_port,RW);
www.nex-robotics.com
Figure 6.2: LCD interface timing diagram
//all the LCD pin's direction set as output
// all the LCD pins are set to logic 0 except PORTC 7
//RS=0 --- Command Input
//RW=0 --- Writing to LCD
//Sending 3 in the upper nibble
//Set Enable Pin
//delay
//Clear Enable Pin
//RS=0 --- Command Input
//RW=0 --- Writing to LCD
Fire Bird V Software Manual
91

Advertisement

loading
Need help?

Need help?

Do you have a question about the Fire Bird V ATMEGA2560 and is the answer not in the manual?