我的程序哪里出错了?
时间:10-02
整理:3721RD
点击:
我的程序哪里出错了?
#include <STC12C5A.h>
#include <string.h>
#include <intrins.h>
#define uchar unsigned char
#define uint unsigned int
sbit PLU=P1^0;
sbit DEC=P1^1;
sbit PLU=P0^0;
sbit RED=P0^1;
/*ADC部分*/
#define FOSC 18432000L
#define BAUD 9600
typedef unsigned char BYTE;
typedef unsigned int WORD;
/*Declare SFR associated with the ADC */
sfr ADC_CONTR = 0xC5; //ADC control register
sfr ADC_RES = 0xC6; //ADC high 8-bit result register
sfr ADC_LOW2 = 0xBE; //ADC low 2-bit result register
sfr P1M0 = 0x91; //P1 mode control register0
sfr P1M1 = 0x92; //P1 mode control register1
只贴出了开始一部分,然后程序报错如下:
file:///C:/Documents%20and%20Settings/Administrator/Application%20Data/Tencent/Users/541183867/QQ/WinTemp/RichOle/5~RT315LJ%7B9W3JRM2VJ8QL8.jpg
我检查了好几遍,发现没有重定义啊
#include <STC12C5A.h>
#include <string.h>
#include <intrins.h>
#define uchar unsigned char
#define uint unsigned int
sbit PLU=P1^0;
sbit DEC=P1^1;
sbit PLU=P0^0;
sbit RED=P0^1;
/*ADC部分*/
#define FOSC 18432000L
#define BAUD 9600
typedef unsigned char BYTE;
typedef unsigned int WORD;
/*Declare SFR associated with the ADC */
sfr ADC_CONTR = 0xC5; //ADC control register
sfr ADC_RES = 0xC6; //ADC high 8-bit result register
sfr ADC_LOW2 = 0xBE; //ADC low 2-bit result register
sfr P1M0 = 0x91; //P1 mode control register0
sfr P1M1 = 0x92; //P1 mode control register1
只贴出了开始一部分,然后程序报错如下:
file:///C:/Documents%20and%20Settings/Administrator/Application%20Data/Tencent/Users/541183867/QQ/WinTemp/RichOle/5~RT315LJ%7B9W3JRM2VJ8QL8.jpg
我检查了好几遍,发现没有重定义啊