本人单片机学得不怎么样,最近毕设要用psoc单片机,在官网上下了个designer 4.4。写了个相当小的程序:
#include <m8c.h> // part specific constants and macros
#include "PSoCAPI.h" // PSoC API definitions for all User Modules
void delay(unsigned int x)
{
while(x--);
}
void main()
{
while(1)
{
PRT0DR=0x00;
delay(5000);
PRT0DR=0x01;
}// Insert your main routine code here.
} |