//测试结果未知
/********************PFC886MF520*************************/
/********************8核测试******************************/
/********************8核测试******************************/
/********************8核测试******************************/
#include "extern.h"
led1 bit pa.2;
led2 bit pa.3;
led3 bit pa.4;
led4 bit pa.5;
led5 bit pa.1;
led6 bit pa.0;
led7 bit pa.7;
led8 bit pa.6;
anjian1 bit pb.0;
anjian2 bit pb.1;
anjian3 bit pb.2;
anjian4 bit pb.3;
void FPPA0 (void)
{
.ADJUST_IC SYSCLK=IHRC/4 // SYSCLK=IHRC/4
pmode Program_Mode; // if has more FPPAs than 2
fppen = 0xFF;
$ led1 out,low;
$ led2 out,low;
$ led3 out,low;
$ led4 out,low;
$ led5 out,low;
$ led6 out,low;
$ led7 out,low;
$ led8 out,low;
$ anjian1 in,pull;
$ anjian2 in,pull;
$ anjian3 in,pull;
$ anjian4 in,pull;
while (1)
{
}
}
void FPPA1 (void)
{
if(anjian1==0)
{
led1=0;
}
else
{
led1=1;
}
goto $;
}
void FPPA2 (void)
{
if(anjian2==0)
{
led2=0;
}
else
{
led2=1;
}
goto $;
}
void FPPA3 (void)
{
if(anjian2==0)
{
led2=0;
}
else
{
led2=1;
}
goto $;
}
void FPPA4 (void)
{
if(anjian2==0)
{
led2=0;
}
else
{
led2=1;
}
goto $;
}
void FPPA5 (void)
{
if(anjian2==0)
{
led2=0;
}
else
{
led2=1;
}
goto $;
}
void FPPA6 (void)
{
if(anjian2==0)
{
led2=0;
}
else
{
led2=1;
}
goto $;
}
void FPPA7 (void)
{
if(anjian2==0)
{
led2=0;
}
else
{
led2=1;
}
goto $;
}
/*
void Interrupt (void)
{
pushaf;
if (Intrq.T16)
{ // T16 Trig
// User can add code
Intrq.T16 = 0;
//...
}
popaf;
}
*/
|