#define XA_LCD
#define LCDDAT DBYTE[0xe000] //"显示器的数据
#define LCDCOM DBYTE[0xe001] //"显示器的指令口
#include<mylib.h>
uchar xsi; //"显示重量时用
uchar xbuf; //"用于显示
uchar tlbuf; //"用于存贮上次仪表电量AD值
extern code uint scgb[];
//"显示24*48点阵数字
unsigned char code asc144[][144]={
//"-- 文字: 0 --
//"-- 宋体36; 此字体下对应的点阵为:宽x高=24x48 --
{0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x001,0x003,0x007,0x006,0x00e,0x00c,0x01c,
0x01c,0x01c,0x038,0x038,0x038,0x038,0x038,0x038,
0x038,0x038,0x038,0x038,0x038,0x038,0x01c,0x01c,
0x01c,0x00c,0x00e,0x006,0x007,0x003,0x001,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x07c,0x0c3,0x081,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x001,0x0c3,0x07c,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x080,0x0c0,0x0e0,0x060,0x060,0x070,
0x070,0x030,0x038,0x038,0x038,0x038,0x038,0x038,
0x038,0x038,0x038,0x038,0x038,0x038,0x030,0x070,
0x070,0x060,0x060,0x0c0,0x0c0,0x080,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000},
//"-- 文字: 1 --
//"-- 宋体36; 此字体下对应的点阵为:宽x高=24x48 --
{0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x003,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x003,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x004,0x00c,0x01c,0x0fc,0x01c,0x01c,0x01c,0x01c,
0x01c,0x01c,0x01c,0x01c,0x01c,0x01c,0x01c,0x01c,
0x01c,0x01c,0x01c,0x01c,0x01c,0x01c,0x01c,0x01c,
0x01c,0x01c,0x01c,0x01c,0x01c,0x01c,0x03e,0x0ff,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x0e0,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000},
//"-- 文字: 2 --
//"-- 宋体36; 此字体下对应的点阵为:宽x高=24x48 --
{0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x001,0x006,0x00c,0x00c,0x01c,0x01c,0x01c,
0x01e,0x01e,0x00e,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x001,0x001,
0x003,0x006,0x00c,0x018,0x010,0x03f,0x03f,0x03f,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x07e,0x083,0x001,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x001,0x001,0x003,
0x007,0x00e,0x01c,0x038,0x070,0x0e0,0x0c0,0x080,
0x000,0x000,0x000,0x000,0x000,0x0ff,0x0ff,0x0ff,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x080,0x0c0,0x0e0,0x0e0,0x070,0x070,0x070,
0x070,0x070,0x070,0x0e0,0x0e0,0x0c0,0x0c0,0x080,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x010,0x010,0x030,0x030,0x060,0x0e0,0x0e0,0x0e0,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000},
//"-- 文字: 3 --
//"-- 宋体36; 此字体下对应的点阵为:宽x高=24x48 --
{0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x001,0x003,0x006,0x00e,0x00e,0x00f,0x00f,
0x007,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x00c,
0x01e,0x01e,0x01e,0x01c,0x00c,0x006,0x003,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x07e,0x083,0x001,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x001,0x007,0x07c,
0x007,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x003,0x0fe,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x080,0x0c0,0x0e0,0x0e0,0x070,0x070,0x070,
0x070,0x070,0x060,0x0e0,0x0c0,0x080,0x000,0x000,
0x080,0x0c0,0x060,0x070,0x030,0x038,0x038,0x038,
0x038,0x038,0x030,0x070,0x060,0x0c0,0x080,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000},
//"-- 文字: 4 --
//"-- 宋体36; 此字体下对应的点阵为:宽x高=24x48 --
{0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x001,0x001,0x003,0x002,
0x004,0x00c,0x008,0x018,0x030,0x03f,0x03f,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x001,0x003,0x003,0x007,0x00f,0x00b,0x01b,0x013,
0x033,0x063,0x043,0x0c3,0x083,0x003,0x003,0x003,
0x003,0x003,0x003,0x003,0x003,0x0ff,0x0ff,0x003,
0x003,0x003,0x003,0x003,0x003,0x003,0x003,0x07f,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x080,0x080,0x080,0x080,0x080,0x080,0x080,0x080,
0x080,0x080,0x080,0x080,0x080,0x080,0x080,0x080,
0x080,0x080,0x080,0x080,0x080,0x0fc,0x0fc,0x080,
0x080,0x080,0x080,0x080,0x080,0x080,0x0c0,0x0fc,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000},
//"-- 文字: 5 --
//"-- 宋体36; 此字体下对应的点阵为:宽x高=24x48 --
{0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x007,0x007,0x007,0x004,0x004,0x004,0x004,0x004,
0x008,0x008,0x008,0x008,0x009,0x00b,0x00e,0x00e,
0x00c,0x000,0x000,0x000,0x000,0x000,0x00c,0x01e,
0x01e,0x01e,0x01c,0x00c,0x00c,0x006,0x003,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x0ff,0x0ff,0x0ff,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x07f,0x0ff,0x081,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x083,0x0fe,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x0f0,0x0f0,0x0f0,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x080,0x0c0,0x0e0,0x070,
0x070,0x078,0x038,0x038,0x038,0x038,0x038,0x038,
0x038,0x030,0x070,0x070,0x0e0,0x0c0,0x080,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000},
//"-- 文字: 6 --
//"-- 宋体36; 此字体下对应的点阵为:宽x高=24x48 --
{0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x001,0x003,0x006,0x00c,0x00c,0x00c,
0x01c,0x018,0x018,0x038,0x038,0x038,0x03b,0x03b,
0x03e,0x03c,0x038,0x038,0x038,0x038,0x038,0x018,
0x01c,0x01c,0x00c,0x00e,0x006,0x003,0x001,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x03f,0x0c1,0x081,0x001,0x001,0x001,0x000,0x000,
0x000,0x000,0x000,0x000,0x03f,0x0ff,0x0c1,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x0c1,0x07e,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x0c0,0x0c0,0x0e0,0x0e0,0x0e0,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x0c0,0x0e0,0x0e0,
0x070,0x070,0x038,0x038,0x038,0x038,0x038,0x038,
0x038,0x038,0x030,0x070,0x060,0x0c0,0x080,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000},
//"-- 文字: 7 --
//"-- 宋体36; 此字体下对应的点阵为:宽x高=24x48 --
{0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x00f,0x00f,0x00f,0x00e,0x008,0x018,0x010,0x010,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x0ff,0x0ff,0x0ff,0x000,0x000,0x000,0x000,0x000,
0x001,0x001,0x003,0x002,0x006,0x004,0x00c,0x00c,
0x018,0x018,0x038,0x030,0x030,0x070,0x070,0x070,
0x070,0x0f0,0x0f0,0x0f0,0x0f0,0x0f0,0x0f0,0x070,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000,
0x0f8,0x0f8,0x0f0,0x030,0x060,0x040,0x0c0,0x08
ADS1232测试程序
ADS1232是一款高精度、低噪声的24位Σ-Δ型模数转换器(ADC),适用于各种工业和医疗应用,如信号调理、传感器测量和数据采集系统。在这个"ADS1232测试程序"中,我们看到它与LPC1114微控制器(MCU)进行了集成,LPC1114是NXP半导体推出的一款基于ARM Cortex-M0内核的经济型微控制器,广泛应用于嵌入式系统设计。 LPC1114在系统中的角色是控制和处理ADS1232的数据流。通过UART(通用异步接收发送器)接口,LPC1114与ADS1232进行通信。UART是一种简单的串行通信协议,用于设备间的双向通信,它只需要两根信号线即可实现数据传输,非常适合在资源有限的微控制器系统中使用。 在测试程序中,ADS1232的输出被读取并由LPC1114处理,然后将这些数据通过液晶显示屏呈现出来。液晶显示屏通常使用SPI或I2C接口与微控制器通信,显示内码及电压信息。内码是指ADC转换后的数字值,它与输入电压成正比,通过内码可以推算出实际的电压值。这在实时监测和分析模拟信号时非常有用。 ADS1232具有高速采样率和出色的分辨率,能够捕捉到微小的电压变化,从而提供高精度的测量结果。它的特点包括内置可编程增益放大器(PGA),允许用户根据应用需求调整输入信号的放大倍数,以及内部温度传感器和参考电压源,为系统提供了额外的便利性。 LPC1114在处理ADS1232的数据时,可能需要执行以下步骤: 1. 初始化UART接口,设置波特率、奇偶校验和数据位等参数。 2. 发送命令给ADS1232,例如配置增益、采样率和数据格式。 3. 启动转换,等待转换完成。 4. 通过UART读取转换结果,这个结果是ADS1232的内码。 5. 将内码转换为对应的电压值,可能需要使用ADS1232的数据手册中的转换公式。 6. 将电压值显示在液晶屏上,可能需要进行适当的格式化处理以适应屏幕显示。 测试程序的目的是验证ADS1232与LPC1114之间的通信是否正常,以及数据处理和显示功能是否准确无误。通过这样的测试,开发者可以确保系统在实际应用中能够正确地获取和显示模拟信号的信息,为后续的系统设计和优化提供可靠的基础。
- 1
- 粉丝: 2
- 资源: 12
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 概率机器学习的Python代码,作者:Kevin Murphy.zip
- 更快的RCNN Python实现见.zip
- 告别枯燥致力于打造 Python 实用小例子更多Python良心教程见.zip
- 工业强度的自然语言处理NLP在Python.zip
- 构建OAuth OpenID连接客户端和服务器的终极Python库包括JWSJWEJWKJWAJWT.zip
- 谷歌Sheets Python API.zip
- 谷歌Python云客户端库.zip
- 关于Python的面试题.zip
- 谷歌Tesseract的Python包装器.zip
- 基于多目标粒子群算法冷热电联供综合能源系统运行优化 采用MATLAB 平台利用多目标粒子群实现求解,构建了含冷、热、电负荷的冷热电联供型综合能源系统优化调度模型,考虑了燃气轮机、电制冷机、锅炉以及风光
- 关于Python数据分析的材料和ipythnotebook,由Wes McKinney编写,OReilly Media.zip
- 毫不妥协的Python代码格式化器.zip
- 关于定量金融的笔记本与交互式python代码的集合.zip
- 黑客贝叶斯方法介绍贝叶斯方法计算理解概率编程第一数学第二观点全部用纯Python编写.zip
- 很棒的python自动完成静态分析和重构库.zip
- 机器人算法的Python示例代码.zip
- 1
- 2
- 3
前往页