打印
[STC单片机]

HX711电子称,5kg压力传感器配套程序,怎么不能编译呢?

[复制链接]
4028|5
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
静静地思考|  楼主 | 2014-4-10 11:00 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
源码在 pan.baidu.com/s/1eQ437VG,各位大神帮忙看一下吧,这源码是淘宝店给的
用的是keill4 版本,总是出现这样的错误提示,
Build target 'Target 1'
compiling main.c...
D:\KEIL4\C51\INC\REG52.H(2): error C231: 'P0': redefinition
D:\KEIL4\C51\INC\REG52.H(3): error C231: 'P1': redefinition
D:\KEIL4\C51\INC\REG52.H(4): error C231: 'P2': redefinition
D:\KEIL4\C51\INC\REG52.H(5): error C231: 'P3': redefinition
D:\KEIL4\C51\INC\REG52.H(6): error C231: 'PSW': redefinition
D:\KEIL4\C51\INC\REG52.H(7): error C231: 'ACC': redefinition
D:\KEIL4\C51\INC\REG52.H(8): error C231: 'B': redefinition
D:\KEIL4\C51\INC\REG52.H(9): error C231: 'SP': redefinition
D:\KEIL4\C51\INC\REG52.H(10): error C231: 'DPL': redefinition
D:\KEIL4\C51\INC\REG52.H(11): error C231: 'DPH': redefinition
D:\KEIL4\C51\INC\REG52.H(12): error C231: 'PCON': redefinition
D:\KEIL4\C51\INC\REG52.H(13): error C231: 'TCON': redefinition
D:\KEIL4\C51\INC\REG52.H(14): error C231: 'TMOD': redefinition
D:\KEIL4\C51\INC\REG52.H(15): error C231: 'TL0': redefinition
D:\KEIL4\C51\INC\REG52.H(16): error C231: 'TL1': redefinition
D:\KEIL4\C51\INC\REG52.H(17): error C231: 'TH0': redefinition
D:\KEIL4\C51\INC\REG52.H(18): error C231: 'TH1': redefinition
D:\KEIL4\C51\INC\REG52.H(19): error C231: 'IE': redefinition
D:\KEIL4\C51\INC\REG52.H(20): error C231: 'IP': redefinition
D:\KEIL4\C51\INC\REG52.H(21): error C231: 'SCON': redefinition
D:\KEIL4\C51\INC\REG52.H(22): error C231: 'SBUF': redefinition
D:\KEIL4\C51\INC\REG52.H(25): error C231: 'T2CON': redefinition
D:\KEIL4\C51\INC\REG52.H(26): error C231: 'RCAP2L': redefinition
D:\KEIL4\C51\INC\REG52.H(27): error C231: 'RCAP2H': redefinition
D:\KEIL4\C51\INC\REG52.H(28): error C231: 'TL2': redefinition
D:\KEIL4\C51\INC\REG52.H(29): error C231: 'TH2': redefinition
D:\KEIL4\C51\INC\REG52.H(34): error C231: 'CY': redefinition
D:\KEIL4\C51\INC\REG52.H(35): error C231: 'AC': redefinition
D:\KEIL4\C51\INC\REG52.H(36): error C231: 'F0': redefinition
D:\KEIL4\C51\INC\REG52.H(37): error C231: 'RS1': redefinition
D:\KEIL4\C51\INC\REG52.H(38): error C231: 'RS0': redefinition
D:\KEIL4\C51\INC\REG52.H(39): error C231: 'OV': redefinition
D:\KEIL4\C51\INC\REG52.H(40): error C231: 'P': redefinition
D:\KEIL4\C51\INC\REG52.H(43): error C231: 'TF1': redefinition
D:\KEIL4\C51\INC\REG52.H(44): error C231: 'TR1': redefinition
D:\KEIL4\C51\INC\REG52.H(45): error C231: 'TF0': redefinition
D:\KEIL4\C51\INC\REG52.H(46): error C231: 'TR0': redefinition
D:\KEIL4\C51\INC\REG52.H(47): error C231: 'IE1': redefinition
D:\KEIL4\C51\INC\REG52.H(48): error C231: 'IT1': redefinition
D:\KEIL4\C51\INC\REG52.H(49): error C231: 'IE0': redefinition
D:\KEIL4\C51\INC\REG52.H(50): error C231: 'IT0': redefinition
D:\KEIL4\C51\INC\REG52.H(53): error C231: 'EA': redefinition
D:\KEIL4\C51\INC\REG52.H(54): error C231: 'ET2': redefinition
D:\KEIL4\C51\INC\REG52.H(55): error C231: 'ES': redefinition
D:\KEIL4\C51\INC\REG52.H(56): error C231: 'ET1': redefinition
D:\KEIL4\C51\INC\REG52.H(57): error C231: 'EX1': redefinition
D:\KEIL4\C51\INC\REG52.H(58): error C231: 'ET0': redefinition
D:\KEIL4\C51\INC\REG52.H(59): error C231: 'EX0': redefinition
D:\KEIL4\C51\INC\REG52.H(62): error C231: 'PT2': redefinition
D:\KEIL4\C51\INC\REG52.H(63): error C231: 'PS': redefinition
D:\KEIL4\C51\INC\REG52.H(64): error C231: 'PT1': redefinition
D:\KEIL4\C51\INC\REG52.H(65): error C231: 'PX1': redefinition
D:\KEIL4\C51\INC\REG52.H(66): error C231: 'PT0': redefinition
D:\KEIL4\C51\INC\REG52.H(67): error C231: 'PX0': redefinition
D:\KEIL4\C51\INC\REG52.H(70): error C231: 'RD': redefinition
D:\KEIL4\C51\INC\REG52.H(71): error C231: 'WR': redefinition
D:\KEIL4\C51\INC\REG52.H(72): error C231: 'T1': redefinition
D:\KEIL4\C51\INC\REG52.H(73): error C231: 'T0': redefinition
D:\KEIL4\C51\INC\REG52.H(74): error C231: 'INT1': redefinition
D:\KEIL4\C51\INC\REG52.H(75): error C231: 'INT0': redefinition
D:\KEIL4\C51\INC\REG52.H(76): error C231: 'TXD': redefinition
D:\KEIL4\C51\INC\REG52.H(77): error C231: 'RXD': redefinition
D:\KEIL4\C51\INC\REG52.H(80): error C231: 'SM0': redefinition
D:\KEIL4\C51\INC\REG52.H(81): error C231: 'SM1': redefinition
D:\KEIL4\C51\INC\REG52.H(82): error C231: 'SM2': redefinition
D:\KEIL4\C51\INC\REG52.H(83): error C231: 'REN': redefinition
D:\KEIL4\C51\INC\REG52.H(84): error C231: 'TB8': redefinition
D:\KEIL4\C51\INC\REG52.H(85): error C231: 'RB8': redefinition
D:\KEIL4\C51\INC\REG52.H(86): error C231: 'TI': redefinition
D:\KEIL4\C51\INC\REG52.H(87): error C231: 'RI': redefinition
D:\KEIL4\C51\INC\REG52.H(90): error C231: 'T2EX': redefinition
D:\KEIL4\C51\INC\REG52.H(91): error C231: 'T2': redefinition
D:\KEIL4\C51\INC\REG52.H(94): error C231: 'TF2': redefinition
D:\KEIL4\C51\INC\REG52.H(95): error C231: 'EXF2': redefinition
D:\KEIL4\C51\INC\REG52.H(96): error C231: 'RCLK': redefinition
D:\KEIL4\C51\INC\REG52.H(97): error C231: 'TCLK': redefinition
D:\KEIL4\C51\INC\REG52.H(98): error C231: 'EXEN2': redefinition
D:\KEIL4\C51\INC\REG52.H(99): error C231: 'TR2': redefinition
D:\KEIL4\C51\INC\REG52.H(100): error C231: 'C_T2': redefinition
D:\KEIL4\C51\INC\REG52.H(101): error C231: 'CP_RL2': redefinition
D:\KEIL4\C51\INC\REG52.H(103): error C231: 'SPEAKER': redefinition
D:\KEIL4\C51\INC\REG52.H(104): error C231: 'RC500RST': redefinition
D:\KEIL4\C51\INC\REG52.H(108): error C231: 'RCAP2LH': redefinition
D:\KEIL4\C51\INC\REG52.H(109): error C231: 'T2LH': redefinition
compiling HX711.c...
Target not created

相关帖子

沙发
yan2626156| | 2014-4-10 11:08 | 只看该作者
主要针对头文件找问题

使用特权

评论回复
板凳
coody| | 2014-4-10 11:12 | 只看该作者
重定义了,你检查是否重复包含了头文件

使用特权

评论回复
地板
ayb_ice| | 2014-4-10 11:41 | 只看该作者
这错误都搞定不定的话,建议改行了

使用特权

评论回复
5
静静地思考|  楼主 | 2014-4-10 12:29 | 只看该作者
ayb_ice 发表于 2014-4-10 11:41
这错误都搞定不定的话,建议改行了

大一刚接触单片机,现在大二想做些项目,问题不断,让您见笑了。 源码在 百度盘里pan.baidu.com/s/1eQ437VG,帮忙看下吧,谢谢

使用特权

评论回复
6
旭日东起| | 2014-4-10 14:56 | 只看该作者
没有找到头文件的啊

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

4

主题

10

帖子

0

粉丝