//本程序是根据51单片机的,可由矩阵键盘设置TLC5615 ad芯片要输出的电压值,
//并由1602液晶屏显现输入的电压值.//完好代码下载: http://www.51hei.com/f/TLC56151602.rar //此程序测验成功,51hei版权所有,假如需求使用到你的项目中只需更改端口即可#include "reg51.h"#include"intrins.h" //_nop_();延时函数用#define uchar unsigned char#define uint unsigned intsbit CLK=P2^5; //三线操控sbit DIN=P2^4;sbit CS=P2^6;sbit rs=P0^0;//指令/数据挑选sbit rw=P0^1;//读写口sbit e=P0^2; //锁存操控uchar data dis1[15]={"output volt is:"}; //显现两行uchar data dis2[13]={".V"};float vout;//体系输出电压int shuzi;//给da数字量int ge,shifen,baifen;//界说个位非常位百分位unsigned int Data[10] = {0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039};//延时函数delay(uint z){uint i,j;for(i=0;i