This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Interrupt Controlled Serial Interface for C167

Hello,

I am looking for example code to using the ASC0/1-Port as an Interrupt Controlled Serial Interface for C167/XC167. I only found polled receive- and transmit-functions checking the ASCx_RIC-flag like:

int getch( void )
{
        int c = EOF;

        if ( ASCx_EIC )
        {
                ASCx_CON_PE = 0;
                ASCx_CON_FE = 0;
                ASCx_CON_OE = 0;
                ASCx_EIC = 0;
                ASCx_RIC = 0;
        }
        else if ( ASCx_RIC )
        {
                c = ASCx_RBUF & 0x7F;
                ASCx_RIC = 0;
        }
        return ( c );
}

main
{
while(1)
{
 c = getch();
}


thanks