: lcd. h ﺗﻮﺍﺑﻊ کﺘﺎﺑﺨﺎﻧﻪ ﺍی . 6 void lcd_putsf(char flash *str); ﺗﻮﺟﻪ. ﺭﺍ ﺩﺭ ﻣﻮﻗﻌیﺖ ﻓﻌﻠی ﻧﻤﺎیﺶ ﻣی ﺩﻫﺪ ، ﺭﺍ کﻪ آﺮﺍیﻪ ﺍی ﺍﺯ کﺎﺭکﺘﺮﻫﺎ ﻣی ﺑﺎﺷﺪ str ﺭﺷﺘﻪ . ﻗﺮﺍﺭ ﺩﺍﺷﺘﻪ ﺑﺎﺷﺪ Flash ﺩﺭﻭﻥ str کﻨیﺪ کﻪ ﻭﻗﺘی ﺍﺯ ﺍیﻦ ﺗﺎﺑﻊ ﺍﺳﺘﻔﺎﺩﻩ ﻣی کﻨیﻢ کﻪ ﺭﺷﺘﻪ : ﺑﺮﺍی ﻣﺜﺎﻝ lcd_clear(); //Clears the LCD lcd_init(16); //Initializes the LCD module and sets the cursor to (0, 0) char c = ‘|’; //Declares char c, and sets its value to ‘|’ lcd_putchar(c); //Prints variable c on the LCD lcd_gotoxy(8, 1); //Sets the new position for the cursor at (8, 2) char str 1[16] = “Hi…”; //Define a array of chars(string). Just like variable c This variable is stored in the microcontrollers RAM. lcd_puts(str 1); //because str 1 is stored in RAM we have to use lcd_puts() lcd_clear(); //Clears the LCD again lcd_putsf ( “AVR Micro”); //Prints “AVR Micro” on the LCD! we use lcd_putsf() because the string “AVR Micro” is part of the code and wasn’t declared in the middle of the program.
blink ﻣکﺎﻥ ﻧﻤﺎ ﻭ Lcd_init(16); // disables the displaying of cursor lcd_clear(); lcd_gotoxy(a, b); /* ensables the displaying of cursor at column a & row b _lcd_ready(); _lcd_write_data(0 x 0 e); ﺳﺘﻮﻥ( پیکﺴﻞ ﺑﺎ ﻫﻢ ﺭﻭﺷﻦ ﻭ 5) 5 x 8 ﺗﻤﺎﺗی blink � ﺩﺭ ﺣﺎﻟﺖ ﺍﺳﺘﻔﺎﺩﻩ ﺍﺯ ﺧﺎﻣﻮﺵ ﻣیﺸﻮﻧﺪ Lcd_init(16); // disables the displaying of cursor lcd_clear(); lcd_gotoxy(a, b); /* ensables the displaying of blink at column a & row b _lcd_ready(); _lcd_write_data(0 x 0 d);
cursor ﻭ blink ﻏیﺮﻓﻌﺎﻝ کﺮﺩﻥ _lcd_ready(); _lcd_write_data(0 x 0 c);