چجوری میتونم به برنامه زیر adc رو اضافه کنم
#include <avr/io.h>
#ifndef F_CPU
#define F_CPU=1000000UL
#endif
#include <util/delay.h>
#include "lcd.h"
int main(void)
{
lcd_init(LCD_DISP_ON_CURSOR); /* initialize lcd, display
on, cursor on */
/* for more options f*/
while(1)
{
lcd_clrscr(); /* clear screen of lcd */
lcd_home(); /* bring cursor to 0,0 */
lcd_puts("MOHSEN"
; /* type something random */
lcd_gotoxy(0,1); /* go to 2nd row 1st col */
lcd_puts("MOHAMMAD"
; /* type something random */
_delay_ms(50); /* wait 50ms */
}
}
#include <avr/io.h>
#ifndef F_CPU
#define F_CPU=1000000UL
#endif
#include <util/delay.h>
#include "lcd.h"
int main(void)
{
lcd_init(LCD_DISP_ON_CURSOR); /* initialize lcd, display
on, cursor on */
/* for more options f*/
while(1)
{
lcd_clrscr(); /* clear screen of lcd */
lcd_home(); /* bring cursor to 0,0 */
lcd_puts("MOHSEN"

lcd_gotoxy(0,1); /* go to 2nd row 1st col */
lcd_puts("MOHAMMAD"

_delay_ms(50); /* wait 50ms */
}
}

دیدگاه