-
大小: 13MB文件类型: .zip金币: 1下载: 0 次发布日期: 2023-07-15
- 语言: 其他
- 标签: AD7616_SCH+P
资源简介
压缩包里面包括AD7616(datasheet,sch,pcb,project.)整套demo资料,可以自己制作demo测试
代码片段和文件信息
#include “main.h“
void Reset_AD7616(void)
{
int i = 0;
// Reset ADC
*pREG_PORTC_DATA_SET = BITM_PORT_DATA_SET_PX4;
for(i=0;i<=1000;i++){}
*pREG_PORTC_DATA_CLR = BITM_PORT_DATA_CLR_PX4;
for(i=0;i<=1000;i++){}
*pREG_PORTC_DATA_SET = BITM_PORT_DATA_SET_PX4;
for(i=0;i<=15000;i++){}
}
void Init_AD7616(void)
{
uint16_t result = 0x00;
Reset_AD7616();
// Init the configuration register which has the register address = 0x02
// bit 7 - self error dection ‘1‘ error ‘0‘ no error
// bit 6 - set ‘1‘ to active the burst mode set ‘0‘ to disable
// bit 5 - set ‘1‘ to active the auto sequencer set ‘0‘ to disable
// bit 4~2 - “000“ no OS; “001“ OS by 2 “010“ OS by 4 ... “111“ OS by 128
// bit 1 - set ‘1‘ to output the status word after conversion data set ‘0‘ to disable
// bit 0 - set ‘1‘ to output the CRC word after conversion/status data set ‘0‘ to disable
result = Wr_AD7616_Reg(0x00020x0062); // burst mode enable seqencer enable no OS yes status no CRC
// Init the range register which has the register address = 0x04 0x05 0x06 0x07
// set +/-5V for A0~A7 B0~B3 set +/-2.5V for B4~B7
result = Wr_AD7616_Reg(0x0004 0x00aa);
result = Wr_AD7616_Reg(0x0005 0x00aa);
result = Wr_AD7616_Reg(0x0006 0x00aa);
result = Wr_AD7616_Reg(0x0007 0x0055);
// Init Sequencer
// Set the sequencer as ?????????
result = Wr_AD7616_Reg(0x0020 0x0011); // 1st event A1 B1 (PIA@A1/VA@B1)
result = Wr_AD7616_Reg(0x0021 0x0000); // 2nd event A0 B0 (PIB@A0/VB@B0)
result = Wr_AD7616_Reg(0x0022 0x0022); // 3rd event A2 B2 (PIC@A2/VC@B2)
result = Wr_AD7616_Reg(0x0023 0x0033); // 4th event A3 B3 (PIN@A3/VN@B3)
result = Wr_AD7616_Reg(0x0024 0x0055); // 5th event A5 B5 (MIA-L@A5/MIA-S@B5)
result = Wr_AD7616_Reg(0x0025 0x0044); // 6th event A4 B4 (MIB-L@A4/MIA-S@B4)
result = Wr_AD7616_Reg(0x0026 0x0066); // 7th event A6 B6 (MIC-L@A6/MIC-S@B6)
result = Wr_AD7616_Reg(0x0027 0x0066); // 8th event A6 B6 (MIC-L@A6/MIC-S@B6)
result = Wr_AD7616_Reg(0x0028 0x0044); // 9th event A4 B4 (MIB-L@A4/MIB-S@B4)
result = Wr_AD7616_Reg(0x0029 0x0055); // 10th event A5 B5 (MIA-L@A5/MIA-L@B5)
result = Wr_AD7616_Reg(0x002A 0x0033); // 11th event A3 B3 (PIN@A3/VN@B3)
result = Wr_AD7616_Reg(0x002B 0x0022); // 12th event A2 B2 (PIC@A2/VC@B2)
result = Wr_AD7616_Reg(0x002C 0x0000); // 13th event A0 B0 (PIB@A0/VB@B0)
result = Wr_AD7616_Reg(0x002D 0x0111); // 14th event A1 B1 (PIA@A1/VA@B1) set bit 8 = ‘1‘ to end sequencer here
*pREG_AD7616_base = 0x00000000; // set AD7616 to output the convert data
}
uint16_t Wr_AD7616_Reg(uint16_t addr uint16_t data)
{
uint16_t word_to_be_send = 0x0000;
uint16_t word_to_be_read = 0x0000;
word_to_be_send = ((addr & 0x003f)<<9)|(d
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-11-02 16:37 AD7616_Demo_V2 (2015-3-31 20-27-15)\
文件 104960 2015-03-14 23:36 AD7616_Demo_V2 (2015-3-31 20-27-15)\01_Power_Supply.SchDoc
文件 100864 2015-03-14 23:36 AD7616_Demo_V2 (2015-3-31 20-27-15)\02_Power_Supply.SchDoc
文件 244224 2015-03-14 23:37 AD7616_Demo_V2 (2015-3-31 20-27-15)\03_AD7616_01.SchDoc
文件 109568 2015-03-14 23:37 AD7616_Demo_V2 (2015-3-31 20-27-15)\04_AD7616_02.SchDoc
文件 82944 2015-03-14 23:57 AD7616_Demo_V2 (2015-3-31 20-27-15)\05_CM40x_01.SchDoc
文件 185856 2015-03-14 23:38 AD7616_Demo_V2 (2015-3-31 20-27-15)\06_CM40x_02.SchDoc
文件 274944 2015-03-14 23:39 AD7616_Demo_V2 (2015-3-31 20-27-15)\07_CM40x_03.SchDoc
文件 80896 2015-03-14 23:39 AD7616_Demo_V2 (2015-3-31 20-27-15)\08_RS232_2_USB.SchDoc
文件 60416 2015-03-14 23:40 AD7616_Demo_V2 (2015-3-31 20-27-15)\09_RS485.SchDoc
文件 84480 2015-03-19 22:24 AD7616_Demo_V2 (2015-3-31 20-27-15)\10_Connectors.SchDoc
文件 93696 2015-03-14 23:41 AD7616_Demo_V2 (2015-3-31 20-27-15)\11_CTPT_Board.SchDoc
文件 41472 2015-03-14 23:42 AD7616_Demo_V2 (2015-3-31 20-27-15)\22_MISC.SchDoc
文件 7049 2015-03-06 10:42 AD7616_Demo_V2 (2015-3-31 20-27-15)\AD7616_Demo_V2.OutJob
文件 2246144 2015-03-24 17:36 AD7616_Demo_V2 (2015-3-31 20-27-15)\AD7616_Demo_V2.PcbDoc
文件 639488 2015-03-09 07:35 AD7616_Demo_V2 (2015-3-31 20-27-15)\AD7616_Demo_V2.PcbLib
文件 46499 2015-04-01 04:27 AD7616_Demo_V2 (2015-3-31 20-27-15)\AD7616_Demo_V2.PrjPcb
文件 57 2015-03-19 22:24 AD7616_Demo_V2 (2015-3-31 20-27-15)\AD7616_Demo_V2.PrjPcbStructure
文件 124928 2015-02-27 16:27 AD7616_Demo_V2 (2015-3-31 20-27-15)\AD7616_Demo_V2.SCHLIB
文件 456159 2015-12-09 11:32 AD7616_Demo_V2.pdf
文件 1074096 2016-08-31 13:50 AD7616_cn.pdf
目录 0 2018-03-19 14:57 Lesson10_AD7616_Demo_V02_20151026\
目录 0 2018-03-19 14:57 Lesson10_AD7616_Demo_V02_20151026\Lesson10_AD7616_Demo_V02_20151026\
文件 3474 2015-05-20 15:40 Lesson10_AD7616_Demo_V02_20151026\Lesson10_AD7616_Demo_V02_20151026\AD7616.c
文件 411 2015-06-23 14:36 Lesson10_AD7616_Demo_V02_20151026\Lesson10_AD7616_Demo_V02_20151026\AD7616.h
文件 2680 2015-05-02 09:08 Lesson10_AD7616_Demo_V02_20151026\Lesson10_AD7616_Demo_V02_20151026\AT24C164.c
文件 561 2015-05-02 09:08 Lesson10_AD7616_Demo_V02_20151026\Lesson10_AD7616_Demo_V02_20151026\AT24C164.h
目录 0 2018-03-19 14:57 Lesson10_AD7616_Demo_V02_20151026\Lesson10_AD7616_Demo_V02_20151026\Debug\
目录 0 2018-03-19 14:57 Lesson10_AD7616_Demo_V02_20151026\Lesson10_AD7616_Demo_V02_20151026\Debug\Exe\
文件 356444 2015-10-27 10:01 Lesson10_AD7616_Demo_V02_20151026\Lesson10_AD7616_Demo_V02_20151026\Debug\Exe\c.out
文件 41069 2015-10-27 10:01 Lesson10_AD7616_Demo_V02_20151026\Lesson10_AD7616_Demo_V02_20151026\Debug\Exe\c.sim
............此处省略88个文件信息
评论
共有 条评论