请移步隔壁板块: https://bbs.21ic.com/icview-3007198-1-1.html
视频: https://www.bilibili.com/video/BV1254y1i7iD/
#include "extern.h"
bit key : pa.3;
bit led : pa.0;
void FPPA0 (void)
{
.ADJUST_IC SYSCLK=IHRC/4 // SYSCLK=IHRC/4
$ led out,low;
$ key in,pull;
while (1)
{
if(key==0)
{
if(led==1)
{
led =0;
}
else
{led =1;}
}
.delay 2000000;
}
}
|