#include "extern.h"
led bit pa.0;
anjian bit pa.3;
void FPPA0 (void)
{
.ADJUST_IC SYSCLK=IHRC/4 // SYSCLK=IHRC/4
$ led out;
$ T16M SYSCLK,/4,BIT15;
engint; //启用全局中断
//disgint //停用全局中断
$ inten t16;
while (1)
{
}
}
void Interrupt (void)
{
pushaf;
if (Intrq.T16)
{
if(led==0){led=1;} else{led=0;}
Intrq.T16 = 0;
}
popaf;
}
|