资源简介
所设计的基于MSP430单片机的液晶显示智能数字气压计及高度测量计,其核心功能部件为博世公司的BMP180芯片,该芯片具有测量压力的功能,其基本原理是利用所携带的压敏元件将待测气压直接变换为电压信号,通过I2C接口,传输至MSP430单片机,并将相应程序事先烧录进单片机,利用主控芯片进行后续处理实时显示数据。

代码片段和文件信息
#include “FG12864A.h“
#include “msp430.h“
#include “stdint.h“
/********printf 相关*******/
#include “stdarg.h“
#define CMD_BUFFER_LEN 100
/*************************/
/********LCD 引脚定义************/
#define P_LCD_DIR P3DIR
#define P_LCD_OUT P3OUT
#define P6_LCD_DIR P6DIR
#define P6_LCD_OUT P6OUT
//因为代码的写法风格,所以这5个引脚最好在同一个Pn下,便于修改
#define LCDCS1 BIT5
#define LCDD_A BIT5//(P6.5)
#define LCDRES BIT6//(P6.6)
#define LCDDATA BIT2
#define LCDCLK BIT6
#define OUTCMD 0
#define OUTDATA 1
/*******************************/
/*************函数声明****************/
void LCDprintf (unsigned char poX unsigned char poYchar *fmt ...);
void delay(int a);
void LcdWrite(unsigned char cmddatunsigned char cmd_or_dat);
void DispChar(unsigned char pageunsigned char columnchar data);
void DispSize6x8(unsigned char pageunsigned char columnunsigned const char *chpoint);
void ClrPage(unsigned char page);
void ClrLcd(void);
void DispString_6x8(unsigned char pageunsigned char columnconst char *string);
void ClrLcd8x(unsigned char columnunsigned char sizeunsigned char page);
void LcdIoInit(void);
void LcdRegInit(void);
void LcdInit(void);
/*************************************/
void LCDprintf (unsigned char poX unsigned char poYchar *fmt ...)
{
static char buffer[CMD_BUFFER_LEN+1];
va_list arg_ptr;
va_start(arg_ptr fmt);
vsnprintf(buffer CMD_BUFFER_LEN+1 fmt arg_ptr);
DispString_6x8(poXpoY( char *)buffer);
va_end(arg_ptr);
}
static const uint8_t FONT6x8[] = {
/* 6x8 font each line is a character each byte is a one pixel wide column
* of that character. MSB is the top pixel of the column LSB is the bottom
* pixel of the column. 0 = pixel off. 1 = pixel on. */
0x000x000x000x000x000x000x00 // space
0x00 0x00 0xFA 0x00 0x00 0x00 // !
0x00 0xE0 0x00 0xE0 0x00 0x00 // “
0x28 0xFE 0x28 0xFE 0x28 0x00 // #
0x24 0x54 0xFE 0x54 0x48 0x00 // $
0xC4 0xC8 0x10 0x26 0x46 0x00 // %
0x6C 0x92 0x6A 0x04 0x0A 0x00 // &
0x00 0x10 0xE0 0xC0 0x00 0x00 // ‘
0x00 0x38 0x44 0x82 0x00 0x00 // (
0x00 0x82 0x44 0x38 0x00 0x00 // )
0x54 0x38 0xFE 0x38 0x54 0x00 // *
0x10 0x10 0x7C 0x10 0x10 0x00 // +
0x00 0x02 0x1C 0x18 0x00 0x00 //
0x10 0x10 0x10 0x10 0x10 0x00 // -
0x00 0x00 0x06 0x06 0x00 0x00 // .
0x04 0x08 0x10 0x20 0x40 0x00 // /
//96 Bytes
0x7C 0x8A 0x92 0xA2 0x7C 0x00 // 0
0x00 0x42 0xFE 0x02 0x00 0x00 // 1
0x42 0x86 0x8A 0x92 0x62 0x00 // 2
0x84 0x82 0x92 0xB2 0xCC 0x00 // 3
0x18 0x28 0x48 0xFE 0x08 0x00 // 4
0xE4 0xA2 0xA2 0xA2 0x9C 0x00 // 5
0x3C 0x52 0x92 0x92 0x0C 0x00 // 6
0x82 0x84 0x88 0x90 0xE0 0x00 // 7
0x6C 0x92 0x92 0x92 0x6C 0x00 // 8
0x60 0x92 0x92 0x94 0x78 0x00
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-05-15 14:36 程序\
文件 293 2016-05-26 10:07 程序\delay.h
文件 12087 2016-05-26 10:07 程序\FG12864A.c
文件 712 2016-05-26 10:06 程序\FG12864A.h
文件 396 2016-05-26 10:07 程序\global.h
文件 11351 2016-05-26 10:06 程序\main.c
文件 3948 2016-05-26 10:06 程序\UCS.C
文件 157 2016-05-26 10:06 程序\UCS.H
- 上一篇:uml大作业学生管理系统
- 下一篇:clark变换,3/2变换,功率不变推导过程
相关资源
- IAR for MSP430 v7.10.1 注册机
- 基于MSP430G2553的蓝牙控制小车
- 利用DS1302和msp430进行闹钟和万年历的
- msp430F149操作红外接收模块源码
- [免费]msp430f149控制PS2键盘并用1602显示
- MSP430f149读sd FAT txt
- 用8位spi实现16位spi
- 基于MSP430单片机的实时多任务操作系
- MSP430系列单片机例程(msp430f235)
- MSP430控制AD9850产生频率可调的方波及
- msp430f449程序
- 基于MSP430的数控直流电压源
- STM32F1单片机MS5611高精度气压计驱动工
- MSP430F5438A Timer_B 操作实验
- MSP430F5438 UCS 时钟操作实验
- MSP430F5438A Timer_A 操作实验
- MSP430F5438 看门狗实验
- IAR EW430连接仿真器在线仿真
- 初识畅学系列MSP430F149单片机开发板
- 畅学多功能实验箱 MSP430F5438 RTC 操作实
- MSP430F5438A RAM操作实验
- msp430f5438a技术资料
- MSP430 JTAGUSB的和并口的与目标板连接的
- MSP430教程:MSP430单片机ADC12模块
- WIA-PA网络技术在井下人员定位系统中
- 16位MSP430单片机的开关稳压电源设计
- 基于mps430f149的12864液晶显示模块编程
- MSP430F5529移植modbus
- MSP430详细教程
- MSP430信号发生器.rar
评论
共有 条评论