昨晚看着好好的闪动的,今天却不行了,什么原因呢?
@far @interrupt void TIM4_TEST(void)
{
static u16 i,j;
i++;
if(i==100)
{
i=0;
j++;
if(j%10==0)
{
LCD_WriteRAM(LCD_RAMRegister_0,0x0f);
LCD_WriteRAM(LCD_RAMRegister_3,0xf0);
LCD_WriteRAM(LCD_RAMRegister_7,0x0f);
LCD_WriteRAM(LCD_RAMRegister_10,0xf0);
}
else if(j%10==5)
{
LCD_WriteRAM(LCD_RAMRegister_0,0x00);
LCD_WriteRAM(LCD_RAMRegister_3,0x00);
LCD_WriteRAM(LCD_RAMRegister_7,0x00);
LCD_WriteRAM(LCD_RAMRegister_10,0x00);
}
if(j==10000)
j=0;
}
TIM4_ClearITPendingBit(TIM4_IT_Update);
}
main()
{
CLK_CONFIG();
LCD_GLASS_Init();
TIM4_CONFIG();
_asm("rim");
} |