This is a migrated thread and some comments may be shown as answers.

Why Cannot CY7C68013A Enter into Serial Port

0 Answers 22 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
ling
Top achievements
Rank 1
ling asked on 14 Jun 2017, 09:38 AM

Hello,all
Can I ask you some advice about CY7C68013A?
The register configurations of serial port are normal. When writing data into SUBF1 in program, the debugging software of serial port also can receive. However,I am confusing about that why the program can’t enter into interruption ? Is it right that the interruption be realized passing LED? I have texted the program of LED,it can operate.

The CY7C68013A datasheet

My program is as following:

 [code]SCON1=0x50;  //ģʽ1£¬Ê¹ÄܽÓÊÕ¹¦ÄÜ
        EICON|=0x80; //Ë«±¶
        
        CKCON=0x10;  //CLKOUT  4·ÖƵ
        TMOD=0x20;   //TIME1  8λ×Ô¶¯ÖØװģʽ
        TH1=0xB2;    //9600²¨ÌØÂÊ
        TF1=0;
        TR1=1;       //ʹÄܶ¨Ê±Æ÷1
        
        ES1 = 1;
        EA=1;

void ISR_UART1        (void) interrupt 7  //´®¿Ú1ÖжϺ¯Êý
{
        if(RI1)
        {
        
                RI1=0;
        }
        if(TI1)
        {/*
                if(rs4_fcout<rs4_fa_cout)
                {
                        rs4_fa_zhi++;     
                        SBUF1=(*rs4_fa_zhi);
                        rs4_fcout++;
                }
                else 
                {
                        rs4_fcout=0;      
                        rs4_fa_cout=0;
                } */
                TI1=0;        
                                        if(IOE&0x01) IOE&=0xfe;
                        else IOE|=0x01;
        }
} [/code]
Can anyone here give me some help? Thanks in advance !

Blessing~

No answers yet. Maybe you can help?

Tags
General Discussion
Asked by
ling
Top achievements
Rank 1
Share this question
or