Your name should move towards right till it reaches the corner. The LCD should display your in the first line, and then create a bouncing effect.
#AVR STUDIO 5 LCD LIBRARY HOW TO#
Now it’s up to you upon how to exploit the library resources. Lcd_puts("ma圎mbedded") /* type something random */Īfter building the project and burning your code, you will see “hello” written in the first row and “ma圎mbedded” written in the second row. Lcd_gotoxy(0,1) /* go to 2nd row 1st col */ Lcd_puts("hello") /* type something random */ Lcd_init(LCD_DISP_ON_CURSOR) /* initialize lcd, display on, cursor on */ Don’t forget to include “lcd.h” header file.
#AVR STUDIO 5 LCD LIBRARY CODE#
Now that you have gone through the different functions available, let’s write a sample code for it. Their description is attached alongwith their declaration.
You will find functions like lcd_init(), lcd_clrscr(), lcd_home(), lcd_gotoxy(), lcd_putc(), lcd_puts(), lcd_puts_p(), lcd_command(), lcd_data() and lcd_puts_P().
Scroll down to the place where you need to set your LCD_IO_MODE.Make sure that this is correct or else there will be mismatch in delay timings. Scroll further down and you will find a line asking you to set your XTAL (or F_CPU).Note the line where it says LCD_IO_MODE = 0 for memory mapped mode, LCD_IO_MODE = 1 for 4 bit mode, whereas 8 bit mode is not supported. As you begin to scroll down, you will find some commented text describing the library.Now make sure that you scroll down very slowly or else you will miss out on some important details. Double click on the ‘lcd.h’ file (in the Solution Explorer) to open it.Now follow the following steps in order to configure the library. Now you can find the two files (the c file and the header file) listed in your project.