求求大佬们看看哪出问题了,1602模块没问题 仿真里读出来的是一个黑块
at24c02.c
main.c
- #include <reg52.h>
- #include <intrins.h>
- #include "at24c02.h"
- #include "proteus_1602.h"
- #define uchar unsigned char
- #define uint unsigned int
- sbit SCK = P1^3;
- sbit SDA = P1^4;
- void main(){
- Delayms(2000);
- while(1){
- uchar temp = 0;
- init();
- init_1602();
- addByte(0x00, 0x00);
- Delayms(10);
- temp = readAddByta(0x00);
- writeData_1602(temp + 0x38);
- Delayms(50);
- }
- }
复制代码
|