PICC\9.81\bin\picc.exe undefined identifier "TRIS"
#include<pic.h>
#include<htc.h>
#include<pic12f508.h>
#define uchar unsigned char
#define uint unsigned int
#define LED_ON GP0 //LED灯闪烁控制脚第7脚
void InitPort (void) /*********继电器/传感器端口初始化函数**********/
{
TRIS = 0; /*设置输入输出位,当设置位为“1”时为输入,设置位为“0”时为输出*/
OPTION = 0x00; /*OPTION复位值为:0xFF */
}
/*****延时毫秒级函数*****/
void Delay_Ms(unsigned char Ms_Time)
{
unsigned char t;
while(Ms_Time--)
{
for(t=0;t<165;t++);
}
}
void main(void)
{
unsigned char VdetAdres;
unsigned int i=0;
Delay_Ms(20);
BZ_H=1;
BZ_L=0;
LED_ON=1;
Delay_Ms(250);
Delay_Ms(250);
while(1)
{
LED_ON=0;
Delay_Ms(250);
Delay_Ms(250);
LED_ON=1;
Delay_Ms(250);
Delay_Ms(250);
}
}
|