Page 197 - 2
P. 197

EICRB=0b00111110;
                TCCR1A=0b10000001;       //OC1A 를 TOP  에서 출력 파형발생모드 0001=0X00FF
                TCCR1B=0b00000000; //   정지
                TIMSK=0x05;//  타이머 카운트 0,1      번 오버플로우
                TCNT0=0x00;        //8 비트 초기화
                TCCR0=0x07;
                TCNT1=0x0000;       //16 비트초기화
                TCNT3L=0x00;
                TCCR3A=0b10000001;
                TCCR3B=0b00000101;       //1024
                ADCSRA=0x8f;
                UCSR0A=0x00;
                UCSR0B=0b10011000;
                UCSR0C=0b00000110;
                UBRR0H=0;
                UBRR0L=103;
                SREG|=0x80;
            }
            void main()
            {
                system_init();
                init_LCD();
                LCD_KEY_DISP();
                while(1)
                {
                    wind();
                    AppInventor();
                    ADMUX = 0x01; // REF    전압을 5   볼트로 설정 채널,       1 번
                    ADCSRA = 0xcf; // 0x8f; + 0x40 : A/D     변환 시작
                }
            }
            void LCD_TEMDATA()
            {
                LCD_cmd_write(0xc7);
                LCD_data_write(four+'0');
                LCD_cmd_write(0xc8);
                LCD_data_write(three+'0');
                LCD_cmd_write(0xc9);
                LCD_data_write('.');
                LCD_cmd_write(0xca);
                LCD_data_write(two+'0');
                LCD_cmd_write(0xcb);
                LCD_data_write(one+'0');
            }
            void temData()


                                                         - 197 -
   192   193   194   195   196   197   198   199   200   201   202