单片机
xidoxu
我有一只小毛驴,我从来也不骑
展开
-
ADDA数模转换——PCF8591
#include <reg52.h>#include <intrins.h>#define MAIN_Fosc 11059200UL //宏定义主时钟HZ#define PCF8591_ADDR 0x90 //PCF8591地址#define DACOUT_EN 0x40 //DAC输出使能sbit BEEP = P2^3;原创 2015-08-15 16:53:35 · 4933 阅读 · 0 评论 -
I2C通信 EEPROM之写与读
#include<reg52.h>#include<intrins.h>#define uchar unsigned char#define uint unsigned intsbit SDA = P2^0;sbit SCL = P2^1;void delay_5us()//5us延时{ _nop_(); }void delay(uint z) //1ms延时{原创 2015-08-13 14:50:12 · 553 阅读 · 0 评论