#include <mega8.h>
#include <stdio.h>
#include <delay.h>
#include <.h>
#include <alcd.h>
#include <string.h>

//#asm
//   .equ __lcd_port=0x12 ;PORTC (PC0, PC1)
//#endasm

///////////////////////////////////////////////////////////////////////////////
#include <.h>
///////////////////////////////////////////////////////////////////////////////
#include < T1.h>
///////////////////////////////////////////////////////////////////////////////
void main(void)
{

lcd_init(16);
//lcd_putsf("sany_tobolsk");
///////////////////////////////////////////////////////////////////////////////  
#include <PORT.h>      
///////////////////////////////////////////////////////////////////////////////   USAR
#include <USAR.h>    
///////////////////////////////////////////////////////////////////////////////   T1
#include <TCCR1.h>
///////////////////////////////////////////////////////////////////////////////   T0
#include <TCCR0.h>
///////////////////////////////////////////////////////////////////////////////   
TIMSK=(0<<OCIE2) | (0<<TOIE2) | (1<<TICIE1) | (0<<OCIE1A) | (0<<OCIE1B) | (0<<TOIE1) | (0<<TOIE0);  //TIMSK=0x10; 
///////////////////////////////////////////////////////////////////////////////   
#include <.h>
///////////////////////////////////////////////////////////////////////////////    
#asm("sei")
///////////////////////////////////////////////////////////////////////////////

usar_put(i);
while (1)  
{
result_get = usar_get();
//usar_put(i);
///////////////////////////////////////////////////////////////////////////////
switch(result_get){
case 'a':
PORTB.0=1;
break;
case 's':
PORTB.0=0;
break;
default:;
}
///////////////////////////////////////////////////////////////////////////////   
sab_to_com_vol();
/////////////////////////////////////////////////////////////////////////////// 
//com_to_sab_vol();
///////////////////////////////////////////////////////////////////////////////    

sprintf(lcd_buf,"vol=%d",Vol);
lcd_gotoxy(0,0);
lcd_clear();
lcd_puts(lcd_buf);
delay_ms(10);


}       
      
      
      
      
      
}
