Page 16 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 16

unsigned int count = 0,sec=30,two,one,N1000,N100,N10,N1,Flag_catch = 0;
            int ar[8]={0x01,0x02,0x04,0x08,0x10,0x20,0x40};






            void score(void)
            {
                N1000 = (Flag_catch/1000)%10;

                N100 = (Flag_catch/100)%10;
                N10 = (Flag_catch/10)%10;

                N1 = (Flag_catch/1)%10;

                PORTB = 0x10 | N1000;

                delay_ms(2);
                PORTB = 0x20 | N100;

                delay_ms(2);
                PORTB = 0x40 | N10;
                delay_ms(2);

                PORTB = 0x80 | N1;
                delay_ms(2);

            }


            void timer_sec (void)

            {
                two = (sec/10)%10;

                one = (sec/1)%10;


                PORTA = 0x20 | two;

                delay_ms(2);
                PORTA = 0x40 | one;

                delay_ms(2);
            }



            void init_system(void)
            {





                                                          -  9  -
   11   12   13   14   15   16   17   18   19   20   21