⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 interrpt.c

📁 瑞萨单片机LCD控制
💻 C
📖 第 1 页 / 共 3 页
字号:
            P2 =  port_2_c2;
            P3 =  port_3_c2;
            P4 =  port_4_c2;
            P5 =  port_5_c2;
            state_common = STATE_COMMON_C2_IN;
            TA1 = TIME_OFF;
            break;
            
        case STATE_COMMON_C2_IN:
            PD0 = 0x0F;
            P0  = 0x00; /* set this common line low */
            P1  = 0; /* set outputs inverse to common line */
            P2  = 0;
            P3  = 0;
            P4  = 0; 
	    P5  = 0;
            state_common = STATE_COMMON_C3_ON;
            TA1 = TIME_ON;
            break;

        case STATE_COMMON_C3_ON:

            PD0 = 0x08;
            P0  = 0x08; /* set this common line to high */
            P1  = ~port_1_c3; /* set outputs inverse to common line */
            P2  = ~port_2_c3;
            P3  = ~port_3_c3;
            P4  = ~port_4_c3;            
            P5  = ~port_5_c3;            

            state_common = STATE_COMMON_C3_IN2;
            TA1 = TIME_OFF;
            break;

        case STATE_COMMON_C3_IN2:
            PD0 = 0x0F;
            P0  = 0x00; /* set this common line low */
            P1  = 0; /* set outputs inverse to common line */
            P2  = 0;
            P3  = 0;
            P4  = 0; 
            P5 =  0;
            state_common = STATE_COMMON_C3_OFF;
            TA1 = TIME_ON;
            break;
            
        case STATE_COMMON_C3_OFF:

            PD0 = 0x08;
            P0  = 0x00; /* set this common line low */
            P1  = port_1_c3; /* set outputs inverse to common line */
            P2 =  port_2_c3;
            P3 =  port_3_c3;
            P4 =  port_4_c3; 
            P5 =  port_5_c3; 

            state_common = STATE_COMMON_C3_IN;
            TA1 = TIME_OFF;
            break;
            
        case STATE_COMMON_C3_IN:
            PD0 = 0x0F;
            P0  = 0x00; /* set this common line low */
            P1  = 0; /* set outputs inverse to common line */
            P2  = 0;
            P3  = 0;
            P4  = 0; 
	    P5  = 0;
            state_common = STATE_COMMON_C0_ON;
            TA1 = TIME_ON;
            break;

        default:
            state_common = STATE_COMMON_C0_ON;
            break;
    }
//    P4=0x00;
}


/**************************************************************************/
/*                                                                        */
/*       timer A2:  interrupt routine                                     */
/*       routine must be adapted to the user's needs                      */
/*                                                                        */
/*       Name         :      timer_a2_interrupt                           */
/*       Date/Author  :      14.04.1997/ST                                */
/*       Parameter    :                                                   */
/*       Return       :                                                   */
/*                                                                        */
/**************************************************************************/
/* Interrupt with using the register bank switch */
// interrupt [ 92] using [ALTERNATE_SET] void near timer_a2_interrupt (void)
/* Interrupt without using the register bank switch */
interrupt [ 92] void near timer_a2_interrupt (void)
{
}

/**************************************************************************/
/*                                                                        */
/*       Timer A3 - interrupt routine                                     */
/*       routine must be adapted to the user's needs                      */
/*                                                                        */
/*       Name         :      timer_a3_interrupt                           */
/*       Date/Author  :      14.04.1997/ST                                */
/*       Parameter    :                                                   */
/*       Return       :                                                   */
/*                                                                        */
/**************************************************************************/
/* Interrupt with using the register bank switch */
// interrupt [ 96] using [ALTERNATE_SET] void near timer_a3_interrupt (void)
/* Interrupt without using the register bank switch */
interrupt [ 96] void near timer_a3_interrupt (void)
{
}

/**************************************************************************/
/*                                                                        */
/*       Timer A4 - interrupt routine                                     */
/*       routine must be adapted to the user's needs                      */
/*                                                                        */
/*       Name         :      timer_a4_interrupt                           */
/*       Date/Author  :      14.04.1997/ST                                */
/*       Parameter    :                                                   */
/*       Return       :                                                   */
/*                                                                        */
/**************************************************************************/
/* Interrupt with using the register bank switch */
// interrupt [100] using [ALTERNATE_SET] void near timer_a4_interrupt (void)
/* Interrupt without using the register bank switch */
interrupt [100] void near timer_a4_interrupt (void)
{
}

/**************************************************************************/
/*                                                                        */
/*       Timer B0 - interrupt routine                                     */
/*       routine must be adapted to the user's needs                      */
/*                                                                        */
/*       Name         :      timer_b0_interrupt                           */
/*       Date/Author  :      10.04.1997/GA                                */
/*       Parameter    :                                                   */
/*       Return       :                                                   */
/*                                                                        */
/**************************************************************************/
/* Interrupt with using the register bank switch */
interrupt [104] using [ALTERNATE_SET] void near timer_b0_interrupt (void)
/* Interrupt without using the register bank switch */
//interrupt [104] void near timer_b0_interrupt (void)
{
  /* Add code here */
}

/**************************************************************************/
/*                                                                        */
/*       Timer B1 - interrupt routine                                     */
/*       routine must be adapted to the user's needs                      */
/*                                                                        */
/*       Name         :      timer_b1_interrupt                           */
/*       Date/Author  :      10.04.1997/GA                                */
/*       Parameter    :                                                   */
/*       Return       :                                                   */
/*                                                                        */
/**************************************************************************/
/* Interrupt with using the register bank switch */
interrupt [108] using [ALTERNATE_SET] void near timer_b1_interrupt (void)
/* Interrupt without using the register bank switch */
//interrupt [108] void near timer_b1_interrupt (void)
{  
  /* Add code here */
}

/**************************************************************************/
/*                                                                        */
/*       Timer B2 - interrupt routine                                     */
/*       routine must be adapted to the user's needs                      */
/*                                                                        */
/*       Name         :      timer_b2_interrupt                           */
/*       Date/Author  :      10.04.1997/GA                                */
/*       Parameter    :                                                   */
/*       Return       :                                                   */
/*                                                                        */
/**************************************************************************/
/* Interrupt with using the register bank switch */
interrupt [112] using [ALTERNATE_SET] void near timer_b2_interrupt (void)
/* Interrupt without using the register bank switch */
//interrupt [112] void near timer_b2_interrupt (void)
{ 
  /* Add code here */
}
 
/**************************************************************************/
/*                                                                        */
/*       INT0- interrupt routine                                          */
/*       routine must be adapted to the user's needs                      */
/*                                                                        */
/*       Name         :      int0_interrupt                               */
/*       Date/Author  :      10.04.1997/GA                                */
/*       Parameter    :                                                   */
/*       Return       :                                                   */
/*                                                                        */
/**************************************************************************/
/* Interrupt with using the register bank switch */
interrupt [116] using [ALTERNATE_SET] void near int0_interrupt (void)
/* Interrupt without using the register bank switch */
//interrupt [116] void near int0_interrupt (void)
{ 
  /* Add code here */
}
 
/**************************************************************************/
/*                                                                        */
/*       INT1- interrupt routine                                          */
/*       routine must be adapted to the user's needs                      */
/*                                                                        */
/*       Name         :      int1_interrupt                               */
/*       Date/Author  :      10.04.1997/GA                                */
/*       Parameter    :                                                   */
/*       Return       :                                                   */
/*                                                                        */
/**************************************************************************/
/* Interrupt with using the register bank switch */
interrupt [120] using [ALTERNATE_SET] void near int1_interrupt (void)
/* Interrupt without using the register bank switch */
//interrupt [120] void near int1_interrupt (void)
{ 
  /* Add code here */
}
 
/**************************************************************************/
/*                                                                        */
/*       INT2- interrupt routine                                          */
/*       routine must be adapted to the user's needs                      */
/*                                                                        */
/*       Name         :      int2_interrupt                               */
/*       Date/Author  :      10.04.1997/GA                                */
/*       Parameter    :                                                   */
/*       Return       :                                                   */
/*                                                                        */
/**************************************************************************/
/* Interrupt with using the register bank switch */
interrupt [124] using [ALTERNATE_SET] void near int2_interrupt (void)
/* Interrupt without using the register bank switch */
//interrupt [124] void near int2_interrupt (void)
{ 
  /* Add code here */
}
 
/**************************************************************************/
/*                                                                        */
/*       SOFT32-interrupt routine                                         */
/*       routine must be adapted to the user's needs                      */
/*                                                                        */
/*       Name         :      soft32_interrupt                             */
/*       Date/Author  :      10.04.1997/GA                                */
/*       Parameter    :                                                   */
/*       Return       :                                                   */
/*                                                                        */
/**************************************************************************/
/* Interrupt with using the register bank switch */
interrupt [128] using [ALTERNATE_SET] void near soft32_interrupt (void)
/* Interrupt without using the register bank switch */
//interrupt [128] void near SOFT32_interrupt (void)
{ 
  /* Add code here */
}
 
 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -