×

AD5677R NanDAC+无操作系统驱动程序

消耗积分:3 | 格式:pdf | 大小:83.58KB | 2021-03-23

刘埃生

分享资料个

This version (22 Apr 2020 07:32) was approved by Mircea Caprioru.The Previously approved version (29 Jan 2020 12:14) is available.Diff

nanoDAC+ No-OS Driver

Supported Devices

Overview

The AD5673R, AD5674R, AD5676, AD5676R, AD5675, AD5675R, AD5677R, AD5679R,AD5686, AD5686R, AD5696, AD5696R / AD5685R, AD5695R / AD5672R, AD5671R, AD5684, AD5684R, AD5694, AD5694R, AD5681R, AD5682R, AD5683R, AD5683, AD5691R, AD5692R, AD5693R, AD5693 are low power, single-channel/octal/quad, 16-/14-/12-bit, buffered voltage output digital-to-analog converter (DAC). All devices operate from a single 2.7 V to 5.5 V supply and are guaranteed monotonic by design.

The AD5673R, AD5674R, AD5676, AD5676R, AD5675, AD5675R, AD5677R, AD5679R,AD5686, AD5686R, AD5696, AD5696R / AD5685R, AD5695R / AD5672R, AD5671R, AD5684, AD5684R, AD5694, AD5694R include a gain select pin giving a full-scale output of 2.5 V (gain = 1) or 5 V (gain = 2).

The AD5673R, AD5674R, AD5676, AD5676R, AD5675, AD5675R, AD5672R, AD5671R,AD5677R, AD5679R, AD5686, AD5686R, AD5685R, AD5684, AD5684R, AD5695R, AD5694, AD5694R, AD5696, AD5696R,AD5681R, AD5682R, AD5683R, AD5683, AD5691R, AD5692R, AD5693R, AD5693 also incorporates a power-on reset circuit and a RSTSEL pin that ensures that the DAC outputs power up to zero scale or midscale and remain there until a valid write takes place. Each device contains a per channel power-down feature that reduces the current consumption of the device to 2 µA/2.5 µA / 4 µA while in power-down mode.

The AD5674R, AD5676, AD5676R, AD5672R, AD5679R, AD5686, AD5686R, AD5685R, AD5684, AD5684R, AD5681R, AD5682R, AD5683R, AD5683 employs a versatile serial peripheral interface (SPI) that operates at clock rates up to 50 MHz.

The AD5673R, AD5675, AD5675R, AD5677R, AD5695R, AD5671R, AD5694, AD5694R, AD5696, AD5696R, AD5691R, AD5692R, AD5693R, AD5693 use a versatile 2-wire serial interface that operates at clock rates up to 400 kHz.

All devices contain a VLOGIC pin intended for 1.8 V/3 V/5 V logic.

Applications:

  • Optical transceivers
  • Base-station power amplifiers
  • Process control (programmable logic control [PLC] input/output cards)
  • Industrial automation
  • Data acquisition systems

Driver Description

Functions Declarations

Function Description
int32_t ad5686_init(struct ad5686_dev **device, struct ad5686_init_param init_param);
Initialize the device.
int32_t ad5686_remove(struct ad5686_dev *dev);
Free the resources allocated by ad5686_init().
uint16_t ad5686_set_shift_reg(struct ad5686_dev *dev, uint8_t command, uint8_t address, uint16_t data);
Write to input register.
void ad5686_write_register(struct ad5686_dev *dev, enum ad5686_dac_channels channel, uint16_t data);
Write to Input Register n (dependent on LDAC).
void ad5686_update_register(struct ad5686_dev *dev, enum ad5686_dac_channels channel);
Update DAC Register n with contents of Input Register n
void ad5686_write_update_register(struct ad5686_dev *dev, enum ad5686_dac_channels channel, uint16_t data);
Write to and update DAC channel n .
uint16_t ad5686_read_back_register(struct ad5686_dev *dev, enum ad5686_dac_channels channel);
Read back Input Register n.
void ad5686_power_mode(struct ad5686_dev *dev, enum ad5686_dac_channels channel, uint8_t mode);
Power down the selected channels.
void ad5686_ldac_mask(struct ad5686_dev *dev, enum ad5686_dac_channels channel, uint8_t enable);
Set up LDAC mask register.
void ad5686_software_reset(struct ad5686_dev *dev);
Software reset (power-on reset)
void ad5686_internal_reference(struct ad5686_dev *dev, uint8_t value);
Write to Internal reference setup register
void ad5686_daisy_chain_en(struct ad5686_dev *dev, uint8_t value);
Set up DCEN register (daisy-chain enable)
void ad5686_read_back_en(struct ad5686_dev *dev, uint8_t value);
Set up readback register (readback enable)
int32_t ad5686_gain_mode(struct ad5686_dev *dev, uint8_t value);
Set gain mode (AD5683 family specific)

Types Declarations

enum ad5686_type {
	ID_AD5671R,
	ID_AD5672R,
       ID_AD5673R,
	ID_AD5674R,
	ID_AD5675R,
	ID_AD5676,
	ID_AD5676R,
       ID_AD5677R,
	ID_AD5679R,
	ID_AD5686,
	ID_AD5684R,
	ID_AD5685R,
	ID_AD5686R,
	ID_AD5694,
	ID_AD5694R,
	ID_AD5695R,
	ID_AD5696,
	ID_AD5696R,
	ID_AD5681R,
	ID_AD5682R,
	ID_AD5683R,
	ID_AD5683,
	ID_AD5691R,
	ID_AD5692R,
	ID_AD5693R,
	ID_AD5693
};
 
enum comm_type {
	SPI,
	I2C,
};
 
enum ad5686_dac_channels {
	AD5686_CH_0 = 0,
	AD5686_CH_1,
	AD5686_CH_2,
	AD5686_CH_3,
	AD5686_CH_4,
	AD5686_CH_5,
	AD5686_CH_6,
	AD5686_CH_7,
	AD5686_CH_8,
	AD5686_CH_9,
	AD5686_CH_10,
	AD5686_CH_11,
	AD5686_CH_12,
	AD5686_CH_13,
	AD5686_CH_14,
	AD5686_CH_15,
};
 
struct ad5686_chip_info {
	uint8_t		resolution;
	uint8_t		register_map;
	enum comm_type	communication;
	const uint32_t *channel_addr;
};
 
struct ad5686_dev {
	/* I2C */
	i2c_desc	*i2c_desc;
	/* SPI */
	spi_desc	*spi_desc;
	/* GPIO */
	gpio_desc	*gpio_reset;
	gpio_desc	*gpio_ldac;
	/* Device Settings */
	enum ad5686_type	act_device;
	uint32_t power_down_mask;
	uint32_t ldac_mask;
};
 
struct ad5686_init_param {
	/* I2C */
	i2c_init_param	i2c_init;
	/* SPI */
	spi_init_param	spi_init;
	/* GPIO */
	int8_t		gpio_reset;
	int8_t		gpio_ldac;
	/* Device Settings */
	enum ad5686_type	act_device;
};

Downloads

声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉

评论(0)
发评论

下载排行榜

全部0条评论

快来发表一下你的评论吧 !

'+ '

'+ '

'+ ''+ '
'+ ''+ ''+ '
'+ ''+ '' ); $.get('/article/vipdownload/aid/'+webid,function(data){ if(data.code ==5){ $(pop_this).attr('href',"/login/index.html"); return false } if(data.code == 2){ //跳转到VIP升级页面 window.location.href="//m.jibsdb.com/vip/index?aid=" + webid return false } //是会员 if (data.code > 0) { $('body').append(htmlSetNormalDownload); var getWidth=$("#poplayer").width(); $("#poplayer").css("margin-left","-"+getWidth/2+"px"); $('#tips').html(data.msg) $('.download_confirm').click(function(){ $('#dialog').remove(); }) } else { var down_url = $('#vipdownload').attr('data-url'); isBindAnalysisForm(pop_this, down_url, 1) } }); }); //是否开通VIP $.get('/article/vipdownload/aid/'+webid,function(data){ if(data.code == 2 || data.code ==5){ //跳转到VIP升级页面 $('#vipdownload>span').text("开通VIP 免费下载") return false }else{ // 待续费 if(data.code == 3) { vipExpiredInfo.ifVipExpired = true vipExpiredInfo.vipExpiredDate = data.data.endoftime } $('#vipdownload .icon-vip-tips').remove() $('#vipdownload>span').text("VIP免积分下载") } }); }).on("click",".download_cancel",function(){ $('#dialog').remove(); }) var setWeixinShare={};//定义默认的微信分享信息,页面如果要自定义分享,直接更改此变量即可 if(window.navigator.userAgent.toLowerCase().match(/MicroMessenger/i) == 'micromessenger'){ var d={ title:'AD5677R NanDAC+无操作系统驱动程序',//标题 desc:$('[name=description]').attr("content"), //描述 imgUrl:'https://'+location.host+'/static/images/ele-logo.png',// 分享图标,默认是logo link:'',//链接 type:'',// 分享类型,music、video或link,不填默认为link dataUrl:'',//如果type是music或video,则要提供数据链接,默认为空 success:'', // 用户确认分享后执行的回调函数 cancel:''// 用户取消分享后执行的回调函数 } setWeixinShare=$.extend(d,setWeixinShare); $.ajax({ url:"https://www.elecfans.com/app/wechat/index.php?s=Home/ShareConfig/index", data:"share_url="+encodeURIComponent(location.href)+"&format=jsonp&domain=m", type:'get', dataType:'jsonp', success:function(res){ if(res.status!="successed"){ return false; } $.getScript('https://res.wx.qq.com/open/js/jweixin-1.0.0.js',function(result,status){ if(status!="success"){ return false; } var getWxCfg=res.data; wx.config({ //debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。 appId:getWxCfg.appId, // 必填,公众号的唯一标识 timestamp:getWxCfg.timestamp, // 必填,生成签名的时间戳 nonceStr:getWxCfg.nonceStr, // 必填,生成签名的随机串 signature:getWxCfg.signature,// 必填,签名,见附录1 jsApiList:['onMenuShareTimeline','onMenuShareAppMessage','onMenuShareQQ','onMenuShareWeibo','onMenuShareQZone'] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2 }); wx.ready(function(){ //获取“分享到朋友圈”按钮点击状态及自定义分享内容接口 wx.onMenuShareTimeline({ title: setWeixinShare.title, // 分享标题 link: setWeixinShare.link, // 分享链接 imgUrl: setWeixinShare.imgUrl, // 分享图标 success: function () { setWeixinShare.success; // 用户确认分享后执行的回调函数 }, cancel: function () { setWeixinShare.cancel; // 用户取消分享后执行的回调函数 } }); //获取“分享给朋友”按钮点击状态及自定义分享内容接口 wx.onMenuShareAppMessage({ title: setWeixinShare.title, // 分享标题 desc: setWeixinShare.desc, // 分享描述 link: setWeixinShare.link, // 分享链接 imgUrl: setWeixinShare.imgUrl, // 分享图标 type: setWeixinShare.type, // 分享类型,music、video或link,不填默认为link dataUrl: setWeixinShare.dataUrl, // 如果type是music或video,则要提供数据链接,默认为空 success: function () { setWeixinShare.success; // 用户确认分享后执行的回调函数 }, cancel: function () { setWeixinShare.cancel; // 用户取消分享后执行的回调函数 } }); //获取“分享到QQ”按钮点击状态及自定义分享内容接口 wx.onMenuShareQQ({ title: setWeixinShare.title, // 分享标题 desc: setWeixinShare.desc, // 分享描述 link: setWeixinShare.link, // 分享链接 imgUrl: setWeixinShare.imgUrl, // 分享图标 success: function () { setWeixinShare.success; // 用户确认分享后执行的回调函数 }, cancel: function () { setWeixinShare.cancel; // 用户取消分享后执行的回调函数 } }); //获取“分享到腾讯微博”按钮点击状态及自定义分享内容接口 wx.onMenuShareWeibo({ title: setWeixinShare.title, // 分享标题 desc: setWeixinShare.desc, // 分享描述 link: setWeixinShare.link, // 分享链接 imgUrl: setWeixinShare.imgUrl, // 分享图标 success: function () { setWeixinShare.success; // 用户确认分享后执行的回调函数 }, cancel: function () { setWeixinShare.cancel; // 用户取消分享后执行的回调函数 } }); //获取“分享到QQ空间”按钮点击状态及自定义分享内容接口 wx.onMenuShareQZone({ title: setWeixinShare.title, // 分享标题 desc: setWeixinShare.desc, // 分享描述 link: setWeixinShare.link, // 分享链接 imgUrl: setWeixinShare.imgUrl, // 分享图标 success: function () { setWeixinShare.success; // 用户确认分享后执行的回调函数 }, cancel: function () { setWeixinShare.cancel; // 用户取消分享后执行的回调函数 } }); }); }); } }); } function openX_ad(posterid, htmlid, width, height) { if ($(htmlid).length > 0) { var randomnumber = Math.random(); var now_url = encodeURIComponent(window.location.href); var ga = document.createElement('iframe'); ga.src = 'https://www1.elecfans.com/www/delivery/myafr.php?target=_blank&cb=' + randomnumber + '&zoneid=' + posterid+'&prefer='+now_url; ga.width = width; ga.height = height; ga.frameBorder = 0; ga.scrolling = 'no'; var s = $(htmlid).append(ga); } } openX_ad(828, '#berry-300', 300, 250);