zhongyuqiang:
不知道怎么回事,老上传不了这么把程序发上去好了#include#include///////调用绝对地址访问函数////#include///////#defineucharunsignedchar#defineuint unsignedint////内部函数/////#definehao0xc0sbit oe =P2^7;sbit rck =P2^6;sbit sck =P2^5;sbit datar=P2^4;sbit wog =P3^5;sbit led =P0^7;sbit s23 =P0^5;sbit s22 =P0^4;sbit s21 =P0^3;sbit s24 =P0^6;sbit SDA =P2^1;sbit SCL =P2^0;//////用到两个字节,第一个字节用来放模式,第2个字节用来放速度///不用也算了////////bitinput=0;bitpower=1;ucharwaita,timea,hui,liang,timeb;ucharcolor,color1,mode,speed,speed1;uchars220,s221,s230,s231,s210,s211,s240,s241,mode;//keyparmerterbitaddr,ishui,istype,istime,iscolor;ucharhuidu,speeddu,colordu,address,type;uchar code spd[]={8,15,30,60,120,240,240};uchar code spd1[]={2,5,13,19,28,45,90};#defineAddWr0xa0/*器件地址选择及写标志*/#defineAddRd0xa1/*器件地址选择及读标志*/////////////////////////////////////////////////voidmDelay(ucharj){uinti;for(;j>0;j--){for(i=0;i