感觉程序没问题,可能是LED灯冲突了,导致颜色不对,绿色加蓝色=青色,然后加上红色就一直是青紫色闪啊闪...
这种问题如何解决?求各位大神指点。
int main(void)
{
while(1)
{
* (unsigned int *)0x40021018 |= ((1)<<3);
* (unsigned int *)0x40010C00 |= ((1)<<(4*0));
* (unsigned int *)0x40010C0C &= ~(1<<0);
DelayMS() ;
* (unsigned int *)0x40021018 |= ((1)<<3);
* (unsigned int *)0x40010C00 |= ((1)<<(4*0));
* (unsigned int *)0x40010C0C |= (1<<0);
DelayMS() ;
* (unsigned int *)0x40021018 |= ((1)<<3);
* (unsigned int *)0x40010C00 |= ((1)<<(4*1));
* (unsigned int *)0x40010C0C &= ~(1<<0);
DelayMS() ;
* (unsigned int *)0x40021018 |= ((1)<<3);
* (unsigned int *)0x40010C00 |= ((1)<<(4*1));
* (unsigned int *)0x40010C0C |= (1<<0);
DelayMS() ;
* (unsigned int *)0x40021018 |= ((1)<<3);
* (unsigned int *)0x40010C00 |= ((1)<<(4*5));
* (unsigned int *)0x40010C0C &= ~(1<<0);
DelayMS() ;
* (unsigned int *)0x40021018 |= ((1)<<3);
* (unsigned int *)0x40010C00 |= ((1)<<(4*5));
* (unsigned int *)0x40010C0C |= (1<<0);
DelayMS() ;
}
} |