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

{

                    char *pstr = 0;
                    pstr = str_data;
                    while(*pstr) //문자열의  끝부분이  아니라면
                    {

                    _delay_ms(2);
                    Putch(*pstr++);                 //시리얼포트로  한개의  문자를  송신한다.
                    }
            }







            int main (void)
            {
                    DDRB = 0xff;

                    PORTA = 0xff;
                    char cmd = 0;
                    _delay_ms(5000);
                init_uart();


                    while(1)

                    {
                            _delay_ms(170);
                            cmd = PINA;
                            switch(cmd)

                            {
                                    case 0xfe :
                                            Putch('A');
                                            break;


                                    case 0xfd :

                                            Putch('B');
                                            break;
                                    default :
                                            break;

                            }
                    }




                                                         -  990  -
   992   993   994   995   996   997   998   999   1000   1001   1002