748【毕设课设】基于单片机出租车打表计价器系统设计

【资源下载】下载地址如下:
https://docs.qq.com/doc/DTlRSd01BZXNpRUxl

748【毕设课设】基于单片机出租车打表计价器系统设计

 

 

748【毕设课设】基于单片机出租车打表计价器系统设计

 

f=05;

u=12;//时
v=00;//分
w=00;//秒
//jiage=d*e; //金额
/////////24C08 读写驱动程序////////////////////
sbit scl=P3^4; // 24c08 SCL
sbit sda=P3^5; // 24c08 SDA
void delay1(unsigned char x)
{ unsigned int i;
for(i=0;i<x;i++);
;}
void flash()
{ ; ; }
void x24c08_init() //24c08 初始化子程序
{scl=1; flash(); sda=1;                     flash();}
void start() //启动(I方C)总线
{sda=1; flash(); scl=1; flash(); sda=0; flash(); scl=0; flash();}
void stop() //停止(I方C)总线
{sda=0; flash(); scl=1; flash(); sda=1; flash();}
void writex(unsigned char j) //写一个字节
{ unsigned char i,temp;
temp=j;
for (i=0;i<8;i++)
{temp=temp<<1; scl=0; flash(); sda=CY; flash(); scl=1; flash();}
scl=0; flash(); sda=1; flash();
}
unsigned char readx() //读一个字节
{
unsigned char i,j,k=0;
scl=0; flash(); sda=1;
for (i=0;i<8;i++)

  

 

上一篇:1276【毕设课设】基于单片机PID算法控制电机转速设计


下一篇:2020-12-08