#include "extern.h"
led1 bit pb.6;
led2 bit pb.7;
key1 bit pb.1;
key2 bit pb.2;
void FPPA0 (void)
{
.ADJUST_IC SYSCLK=IHRC/4 // SYSCLK=IHRC/4
// Insert Initial Code
pmode Program_Mode; // if has more FPPAs than 2
fppen = 0xFF;
$ led1 out; //输出
$ led2 out;
$ key1 in,pull; //输入,上拉电阻
$ key2 in,pull;
while (1)
{
if(led2){led2 =0;}
else{led2 =1;}
.delay 500000;
}
}
void FPPA1 (void)
{
while(1)
{
if(key1==0){led1 =0;}
if(key2==0){led1 =1;}
}
}
void FPPA2 (void)
{
goto $;
}
void FPPA3 (void)
{
goto $;
}
void FPPA4 (void)
{
goto $;
}
void FPPA5 (void)
{
goto $;
}
void FPPA6 (void)
{
goto $;
}
void FPPA7 (void)
{
goto $;
}
/*
void Interrupt (void)
{
pushaf;
if (Intrq.T16)
{ // T16 Trig
// User can add code
Intrq.T16 = 0;
//...
}
popaf;
}
*/
|