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

void Putch(char data)

            {
                    UDR = data;
                    while(!(UCSRA & (1 << TXC)));



                    if(toggle == 0)
                    {
                            PORTB = 0x01;
                            toggle = 1;
                    }



                    else
                    {
                            PORTB = 0x00;
                            toggle = 0;

                    }
            }


            int main(void)
            {
                    u16 mux = 0, updown = 0, leftright = 0;



                    DDRA = 0x00;
                    DDRB = 0xff;
                    DDRD = 0xff;



                    init_uart();


                    ADMUX = 0x00;
                    ADCSRA = 0x8f;
                    SREG |= 0x80;



                    while(1)
                    {
                            if(mux > 2)

                                    mux = 1;






                                                         -  994  -
   996   997   998   999   1000   1001   1002   1003   1004   1005   1006