- 1、本文档共28页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
ad7705源程序(国外英语资料)
ad7705源程序
AD7705 source
AD7705 head file
#ifndef _AD7705_H
#define _AD7705_H
Communication / register address definition
#define WR_SETUP_REG 0x10 / / select write register
#define RD_SETUP_REG 0x18 / / select write register
#define WR_CLOCK_REG 0x20 / / select write clock register
#define RD_DATA_REG 0x38 / / selected data register read
#define WR_OFFSET_REG 0x60 / / offset write select register
#define RD_OFFSET_REG 0x68 / / offset read select register
#define WR_FULL_REG 0x70 full scale / / select write register
#define RD_FULL_REG 0x78 full scale / / select read register
#define SYS_ZERO_CALI 0x80 / / system zero calibration mode
#define SYS_FULL_CALI 0xC0 / / system full scale calibration mode
#define ZERO_CALIBRATION / / 0x00 system zero calibration
#define FULL_CALIBRATION / / 0x01 full scale calibration system
//CLOCK register setting with no frequency division, 50HZ output update rate
#define CLOCK_REG_SET 0X04
/ / function declaration
Void reset_AD7705 (void);
Unsigned char read_AD7705_byte (void);
Unsigned int read_AD7705_word (void);
Unsigned, long, int, read_AD7705_dword (void);
Void write_AD7705_byte (unsigned, char, data);
Void write_AD7705_word (unsigned, int, data);
Void write_AD7705_dword (unsigned, long, int, data);
Void ReadData7705 (unsigned, int, *const, pdata);
Void AD7705_calibration (void);
Void start_AD7705 (void);
#endif
The main AD7705 file
#include util/delay.h
#include avr/eeprom.h
#include ad7705.h
#include main.h
#include crc16.h
#include Usart.h
Set the content for the four / range register
/ / (1) for unipolar V input 0-5V, 0-20mA, 0-10V level of the three input range, the range of 0-2V, no polarity, gain is 1, --0-2V buffer mode
/ / (2) for bipolar V level input +-2.5V, +-5V the two range, the input range is +-1V, bipolar, --+-2V buffer mode gain of 2.
/ / (3) for double precision mV level input +-500mV, the gain is 4, bipolar, --+-2V buffer mode
/ / (4) of double precision mV level +-50mV, the gain is 32, bipolar, --+-1.6V buffer
您可能关注的文档
- (锅盖子)升级破解方法(国外英语资料).doc
- (考试时间:70分钟 试卷满分:70分 考试形式:开卷)(国外英语资料).doc
- (大一必读)写给即将踏入大一的同学,如何度过我的大学(国外英语资料).doc
- (持续添加修正)各地名店名厨多款流行火锅蘸料、味碟配方经典总汇(麻酱、沙茶、海鲜、香辣、肥牛等)(国外英语资料).doc
- (一)申请入本人递交入党申请书(国外英语资料).doc
- (强力推荐)大规模的海水运动(二)洋流对地理环境的影响(国外英语资料).doc
- (设计)工作细则 - 上海工程技术大学 继续教育学院(国外英语资料).doc
- (问答和操作题)(国外英语资料).doc
- 001探究题(黄冈市物理中考题调考题汇编)(国外英语资料).doc
- 01_NEW YORK SENATE RACE SPEECH(国外英语资料).doc
文档评论(0)