# include<built-in.h>
Sbit rs at PORTD4-bit;
Sbit EN at PORTD6-bit;
Sbit RW at PORT5-bit;
Void main(){
DDRD=0*FF;
Lcd();
UART1-init(9600);
Com(0*01);
Dal(0*80);
Lcd-string(Transformer protect);
Dal(0*c0);
Lcd-string(system by buga);
Delay-ms(1000);
Com(0*01);
Dal(0*80);
Lcd-strig(aminu bugaje);
Voltage=temp=current;
While(1){
Delay-ms(1000);
Temp=ADC-Read(0*00)/4;
Voltage=ADC-Read(0*01)/4;
Com(0*c0);
Lcd-string(TEMP:);
Ascii(temp*2);
Com(0*d4);
Lcd-string(current:);
If (temp >20)
{com(0*cb);
Lcd-string(over);
If (temp<20)
{com(0*cb);
Lcd-string(norm);}
If (current>130)
{com(0*e2);
Lcd-string(over-);
Relay=0;}
If (current< 130)
{com(0*e2);
Lcd-string(norm-);
Relay=1;
If(voltage>120)
{com(0*a1);
Lcd-string(over-);
Relay2=0;
If((voltage<120)&&(voltage>=110))
{com(0*a1);
Lcd-string(norm-);
Relay2=1;
If(voltage<110)
{com(0*a1);
Lcd-string(under-);
Relay2=1;