单片机学习小组
直播中

陈飞

7年用户 1173经验值
私信 关注

如何利用AD0832去完成一种电压表32X16点阵显示的设计

如何利用AD0832去完成一种电压表32X16点阵显示的设计?

回帖(1)

贾小龙

2022-2-23 09:30:05
#include
#include
#include

#define ulong unsigned long
#define uint unsigned int
#define uchar unsigned char
uchar k,i,j;
float l;
***it sw=P3^0;      //159选通开关
***it ADCS =P3^1;  //ADC0832 chip seclect
***it ADDI =P3^3;  //ADC0832 k in
***it ADDO =P3^3;  //ADC0832 k out
***it ADCLK =P3^2;  //ADC0832 clock signal

uchar dsw[20];  //存放sprintf转换字符
uchar idata value[149]; //点阵字符储存
uchar code table[]={    //字符查表
0x00,0x00,0x00,0x30,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*".",0*/

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0xE0,0x0F,0x10,0x10,0x08,0x20,0x08,0x20,0x10,0x10,0xE0,0x0F,0x00,0x00,/*"0",1*/

0x00,0x00,0x10,0x20,0x10,0x20,0xF8,0x3F,0x00,0x20,0x00,0x20,0x00,0x00,0x00,0x00,/*"1",2*/

0x00,0x00,0x70,0x30,0x08,0x28,0x08,0x24,0x08,0x22,0x88,0x21,0x70,0x30,0x00,0x00,/*"2",3*/

0x00,0x00
举报

更多回帖

发帖
×
20
完善资料,
赚取积分