Page 1136 - 3-3
P. 1136

#include "uart.h"
          #include "ctrl_main.h"


          char allow_remote=1;


          interrupt [USART0_RXC] void usart0_rxc(void){
              char text;
              text=UDR0;
              data_receive(text);
          }


          interrupt [USART1_RXC] void usart1_rxc(void){
              char text;
              text=UDR1;
              data_receive(text);
          }


          interrupt [TIM2_OVF] void timer2_int(void){
              TCNT2=99;
              time_count++;
              if(lcd_count>=1)
              {
                  if(lcd_count<51)lcd_count++;
                  if(lcd_count==50)lcd_count=0;
              }


              if(door_count>=1)
              {
                  door_count++;
                  if(door_count==100)
                  {
                      PORTC.4=1;
                      door_count=0;
                  }
              }
              if(gas_count>=1)
              {
                  gas_count++;


                  if(gas_count==300)
                  {
                      PORTD.6=0;
                      gas_count=0;
                  }
              }


                                                        - 1136 -
   1131   1132   1133   1134   1135   1136   1137   1138   1139   1140   1141