#Define #Include #Include #Include #Include #Define #Define #Define #Define #Define #Define #Define #Define #Define Void Unsigned Char
#Define #Include #Include #Include #Include #Define #Define #Define #Define #Define #Define #Define #Define #Define Void Unsigned Char
void lcd_init(){
LCD_DDDR = 0xFF;
LCD_CDDR = 0xFF;
LCD_CPRT &= ~(1<<LCD_EN);
_delay_us(2000);
lcdCommand(0x38);
lcdCommand(0x0E);
lcdCommand(0x01);
_delay_us(2000);
lcdCommand(0x06);
}
for(;;);
return 0;
lcd_gotoxy(1,1);
lcd_print("Freq' ");
lcd_gotoxy(1,2);
lcd_print("Hz");
while(1)
{
TCCR1A = 0;
TCNT1=0;
TIFR = (1<<ICF1); /* clear ICP flag (Input Capture
flag) */
ltoa(freq,frequency,10);
itoa((int)duty_cycle,duty_cy,10);
lcd_gotoxy(1,1);
lcd_print("Freq' ");
lcd_gotoxy(1,2);
lcd_print("Hz");
/*LCD_Command(0x80);
LCD_String("Freq: ");
LCD_String(frequency);
LCD_String(" Hz ");
LCD_Command(0xC0);
LCD_String("Duty: ");
LCD_String(duty_cy);
LCD_String(" % ");*/
else
{
}
_delay_ms(50);
}
}