Download Print this page

NEX ROBOTICS Fire Bird V ATMEGA2560 Software Manual page 93

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

Advertisement

NEX Robotics
6.1.4 Function to write data on LCD
//Function to write data on LCD
void lcd_wr_char(char
letter)
{
char
temp;
temp = letter;
temp = (temp & 0xF0);
lcd_port &= 0x0F;
lcd_port |= temp;
sbit(lcd_port,RS);
cbit(lcd_port,RW);
sbit(lcd_port,EN);
_delay_ms(5);
6.1.5 Function for LCD home
void
lcd_home()
{
lcd_wr_command(0x80);
}
6.1.6 Function to Print String on LCD
void lcd_string(char
*str)
{
while(*str != '\0')
{
lcd_wr_char(*str);
str++;
}
}
6.1.7 Position the LCD cursor at "row", "column"
//Position the LCD cursor at "row", "column"
void
lcd_cursor
(char
row,
{
switch
(row) {
case
1: lcd_wr_command (0x80 + column - 1);
case
2: lcd_wr_command (0xc0 + column - 1);
case
3: lcd_wr_command (0x94 + column - 1);
case
4: lcd_wr_command (0xd4 + column - 1);
default:
}
}
6.1.8 Function to print any input value up to the desired digit on LCD
// Function to print any input value up to the
desired digit on LCD
void
lcd_print
(char
row,
int
value,
int
digits)
{
unsigned char
flag=0;
if(row==0||coloumn==0)
{
www.nex-robotics.com
char
column)
break;
char
column,
unsigned
Fire Bird V Software Manual
cbit(lcd_port,EN);
letter = letter & 0x0F;
letter = letter<<4;
lcd_port &= 0x0F;
lcd_port |= letter;
sbit(lcd_port,RS);
cbit(lcd_port,RW);
sbit(lcd_port,EN);
_delay_ms(5);
cbit(lcd_port,EN);
}
break;
break;
break;
break;
lcd_home();
}
else
{
lcd_cursor (row, column);
}
if(digits==5 || flag==1)
{
93

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?

Subscribe to Our Youtube Channel