C 15
Lcd.h AVR with PORTB By arianramianpour on 15th May 2025 07:22:52 AM
  1. #ifndef _LCD_H
  2. #define _LCD_H
  3.  
  4.  
  5.  #define LCD_PORT PORTB   //Set the port
  6.  #define LCD_DDR  DDRB    //set the DDR
  7.  #define LCD_DS      5    //DS Connceted to atmegapin
  8.  #define LCD_SH_CP   4    //SH_CP Connceted to atmegapin
  9.  #define LCD_ST_CP   6    //ST_CP Connceted to atmegapin
  10.  
  11. #pragma used+
  12.  
  13.  
  14. void lcd_init();                    //You only need to run this once and its should run before all other commands
  15. void lcd_putchar(char c);          //This is used to print one character on lcd
  16. void lcd_puts(char *c);             //This is used to print an string on lcd
  17. void lcd_clear();                   //This will clear the lcd and return the cursor to 0,0
  18. void lcd_gotoxy(char x , char y);   //This will force the cursor to print on selected x and y
  19.  
  20.  
  21. #pragma used-
  22. #endif

Hightechrobo bin is for source code and general debugging text.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste

Login or Register to edit or fork this paste. It's free.