//----------------------------------------------------------------------------
// C main line
//----------------------------------------------------------------------------
#include <m8c.h> // part specific constants and macros
#include "PSoCAPI.h" // PSoC API definitions for all User Modules
void main(void)
{
LED_1_Start();
Timer16_1_WritePeriod(365);
Timer16_1_EnableInt();
Timer16_1_Start();
while(1);
// Insert your main routine code here.
}
#pragma interrupt_handler Timer16_1_ISR
void Timer16_1_ISR()
{
unsigned int i;
i++;
if(i==100)
{
LED_1_Invert();
i=0;
}
}
我在配置的时候LED_1 为port0.0.但是接上去是没有反应的。波形好像是正玄波,我希望是可以闪烁的。谢谢 |