首页> 新闻资讯 >抓紧收藏,ADS1247和ADS1248寄存器操作中文说明

抓紧收藏,ADS1247和ADS1248寄存器操作中文说明 发布时间:2020-02-24 阅读人数:

不少电子工程师和我一样,对于TI官网ADS1247和ADS1248的英文数据手册,读起来、理解起来有些吃力,晦涩的感觉。笔者在网上搜集的对于ADS1247和ADS1248寄存器操作的中文说明,个别地方坐了润色和修改,分享给大家 ,共同学习。


ADS1247与ADS1248的寄存器列表


 

ADDRESS

REGISTER

BIT 7

BIT 6

BIT 5

BIT 4

BIT 3

BIT 2

BIT 1

BIT 0

00h

MUX0

BCS1

BCS0

MUX_SP2

MUX_SP1

MUX_SP0

MUX_SN2

MUX_SN1

MUX_SN0

01h

VBIAS

VBIAS7

VBIAS6

VBIAS5

VBIAS4

VBIAS3

VBIAS2

VBIAS1

VBIAS0

02h

MUX1

CLKSTAT

VREFCON1

VREFCON0

REFSELT1

REFSELT0

MUXCAL2

MUXCAL1

MUXCAL0

03h

SYS0

0

PGA2

PGA1

PGA0

DR3

DR2

DR1

DR0

04h

OFC0

OFC7

OFC6

OFC5

OFC4

OFC3

OFC2

OFC1

OFC0

05h

OFC1

OFC15

OFC14

OFC13

OFC12

OFC11

OFC10

OFC9

OFC8

06h

OFC2

OFC23

OFC22

OFC21

OFC20

OFC19

OFC18

OFC17

OFC16

07h

FSC0

FSC7

FSC6

FSC5

FSC4

FSC3

FSC2

FSC1

FSC0

08h

FSC1

FSC15

FSC14

FSC13

FSC12

FSC11

FSC10

FSC9

FSC8

09h

FSC2

FSC23

FSC22

FSC21

FSC20

FSC19

FSC18

FSC17

FSC16

 

0Ah

 

IDAC0

 

ID3

 

ID2

 

ID1

 

ID0

DRDY MODE

 

IMAG2

 

IMAG1

 

IMAG0

0Bh

IDAC1

I1DIR3

I1DIR2

I1DIR1

I1DIR0

I2DIR3

I2DIR2

I2DIR1

I2DIR0

0Ch

GPIOCFG

IOCFG7

IOCFG6

IOCFG5

IOCFG4

IOCFG3

IOCFG2

IOCFG1

IOCFG0

0Dh

GPIODIR

IODIR7

IODIR6

IODIR5

IODIR4

IODIR3

IODIR2

IODIR1

IODIR0

0Eh

GPIODAT

IODAT7

IODAT6

IODAT5

IODAT4

IODAT3

IODAT2

IODAT1

IODAT0

 

ADS1247 and ADS1248 寄存器定义

MUX0多路控制开关0。此寄存器可以任意组合的差分输入选择的任何输入通道。请注意,此设置可以通过muxcal和VBIAS位取代。

MUX0  地址00H                                                                                         RESET VALUE = 01h

BIT 7

BIT 6

BIT 5

BIT 4

BIT 3

BIT 2

BIT 1

BIT 0

BCS1

BCS0

MUX_SP2

MUX_SP1

MUX_SP0

MUX_SN2

MUX_SN1

MUX_SN0

Bits 7:6   BCS1:0          电流源电流大小设置

00 =关闭电流源(默认)

01 = 0.5uA

10 = 2uA

11 = 10uA

Bits 5:3          MUX_SP2:0  正输入通道选择

000 = AIN0 (default)

001 = AIN1

010 = AIN2

011 = AIN3

100 = AIN4 (ADS1248only)

101 = AIN5 (ADS1248only)

110 = AIN6 (ADS1248only)

111 = AIN7 (ADS1248only)

Bits 2:0       MUX_SN2:0 负输入通道选择

000 = AIN0

001 = AIN1 (default)

010 = AIN2

011 = AIN3

100 = AIN4 (ADS1248only)

101 = AIN5 (ADS1248only)

110 = AIN6 (ADS1248only)

111 = AIN7 (ADS1248only)

 

VBIAS—偏执电压设置寄存器

VBIAS – 地址 01h                                                                                                                                                         RESET VALUE = 00h

DEVICE

BIT 7

BIT 6

BIT 5

BIT 4

BIT 3

BIT 2

BIT 1

BIT 0

ADS1248

VBIAS7

VBIAS6

VBIAS5

VBIAS4

VBIAS3

VBIAS2

VBIAS1

VBIAS0

ADS1247

0

0

0

0

VBIAS3

VBIAS2

VBIAS1

VBIAS0

Bits 7:0       VBIAS7:0 设置偏压(AVDD + AVSS)/2到选择的模拟输入

0 = 关闭偏执电压 (default)

1 = 开启偏执电压到对应的输入 (bit 0 对应到AIN0,依次类推.).

 

MUX1—多路开关控制器1

MUX1 - ADDRESS 02h                                                                                                                                                   RESET VALUE = 00h

BIT 7

BIT 6

BIT 5

BIT 4

BIT 3

BIT 2

BIT 1

BIT 0

CLKSTAT

VREFCON1

VREFCON0

REFSELT1

REFSELT0

MUXCAL2

MUXCAL1

MUXCAL0

Bit 7           CLKSTAT  此位为只读,并表示内部或外部振荡器是否正在使用。

0 = 内部时钟正在使用

1 = 外部时钟正在使用

Bits 6:5       VREFCON1:0  控制内部电压基准。这些位允许引用完全打开或关闭,或允许引用状态跟随设备的状态。注意内部参考为IDAC功能操作要求。

00 =关闭基准fault)

01 = 一直开启基准

10 or 11 =转换完成后或关机操作后关闭基准(跟随相关状态自动开启或关闭)

Bits 4:3       REFSELT1:0 ADC参考选择

00 =使用REF0作为基准输入(default)

01 =使用REF1作为基准输入(只支持ADS1248)

10 =选择内部基准

11 =在内部连接到参考选择REF0输入对(不知道干嘛的)

Bits 2:0       MUXCAL2:0这些位用于选择一个测量方式(选择的测量方式将取代MUX_SP, MUX_SN,  and VBIAS)

000 =正常运行 (default)

001 =偏移测量

010 =增益测量

011 =内部温度测量

100 = 外部 REF1 测量(ADS1248 only)

101 = 外部REF0测量

110 = AVDD 测量

111 = DVDD 测量

MUXCAL 设置

 

MUXCAL[2:0]

PGA GAIN 设置

ADC INPUT

000

通过SYS0设置

正常模式

001

通过SYS0设置

输入接到 (AVDD + AVSS)/2

010

强制设置为1 1

VREFP – VREFN (full-scale)

011

强制设置为1

内部温度测量

100

强制设置为1

(VREFP1 – VREFN1)/4

101

强制设置为1

(VREFP0 – VREFN0)/4

110

强制设置为1

(AVDD – AVSS)/4

111

强制设置为1

(DVDD – DVSS)/4


设置会修改PGA,恢复正常模式后PGA由SYS0控制

 

 


SYS0—系统控制寄存器 0

SYS0 - ADDRESS 03h                                                                                                                                                    RESET VALUE = 00h

BIT 7

BIT 6

BIT 5

BIT 4

BIT 3

BIT 2

BIT 1

BIT 0

0

PGA2

PGA1

PGA0

DOR3

DOR2

DOR1

DOR0

Bit 7           必须一直为 '0'

Bits 6:4       PGA2:0  PGA增益设置

000 = 1 (default)

001 = 2

010 = 4

011 = 8

100 = 16

101 = 32

110 = 64

111 = 128

Bits 3:0       DOR3:0  ADC采集速率设置 最大设置为1001,选择2000sps

0000 = 5SPS (default)

0001 = 10SPS

0010 = 20SPS

0011 = 40SPS

0100 = 80SPS

0101 = 160SPS

0110 = 320SPS

0111 = 640SPS

1000 = 1000SPS

1001 to 1111 = 2000SPS

 

OFC23:0    ADS1248偏移校准系数寄存器.

 


OFC0—偏移校正系数寄存器0

OFC0 - ADDRESS 04h                                                                                                                                           RESET VALUE = 000000h

BIT 7

BIT 6

BIT 5

BIT 4

BIT 3

BIT 2

BIT 1

BIT 0

OFC7

OFC6

OFC5

OFC4

OFC3

OFC2

OFC1

OFC0

 

OFC1—偏移校正系数寄存器1

OFC1 - ADDRESS 05h                                                                                                                                           RESET VALUE = 000000h

BIT 7

BIT 6

BIT 5

BIT 4

BIT 3

BIT 2

BIT 1

BIT 0

OFC15

OFC14

OFC13

OFC12

OFC11

OFC10

OFC9

OFC8

 

OFC2—偏移校正系数寄存器2

OFC2 - ADDRESS 06h                                                                                                                                           RESET VALUE = 000000h

BIT 7

BIT 6

BIT 5

BIT 4

BIT 3

BIT 2

BIT 1

BIT 0

OFC23

OFC22

OFC21

OFC20

OFC19

OFC18

OFC17

OFC16

 

FSC23:0 满量程校准系数寄存器(复位后恢复出厂校准值).

FSC0—满量程校准寄存器0

FSC0 - ADDRESS 07h                                                                                                                      RESET VALUE IS PGA DEPENDENT (1)

BIT 7

BIT 6

BIT 5

BIT 4

BIT 3

BIT 2

BIT 1

BIT 0

FSC7

FSC6

FSC5

FSC4

FSC3

FSC2

FSC1

FSC0

 


FSC1—满量程校准寄存器1

FSC1 - ADDRESS 08h                                                                                                                      RESET VALUE IS PGA DEPENDENT (1)

BIT 7

BIT 6

BIT 5

BIT 4

BIT 3

BIT 2

BIT 1

BIT 0

FSC15

FSC14

FSC13

FSC12

FSC11

FSC10

FSC9

FSC8

 

FSC2—满量程校准寄存器2

FSC2 - ADDRESS 09h                                                                                                                      RESET VALUE IS PGA DEPENDENT (1)

BIT 7

BIT 6

BIT 5

BIT 4

BIT 3

BIT 2

BIT 1

BIT 0

FSC23

FSC22

FSC21

FSC20

FSC19

FSC18

FSC17

FSC16

 

IDAC0 可编程电流源控制寄存器 0

IDAC0 - ADDRESS 0Ah                                                                                                                                                  RESET VALUE = x0h

BIT 7

BIT 6

BIT 5

BIT 4

BIT 3

BIT 2

BIT 1

BIT 0

ID3

ID2

ID1

ID0

DRDY MODE

IMAG2

IMAG1

IMAG0

Bits 7:4       ID3:0

只读只读,工厂编程位,用于识别修改版本。

Bit 3           DRDY MODE  用于设置DOUT/DRDY输出数据准备就绪状态,低电平有效

0 = DOUT/DRDY仅作为数据输出(default)

1 = DOUT/DRDY引脚功能既作为数据输出和数据准备,低电平有效

Bits 2:0  IMAG2:0   ADS1247/8有两个可编程电流源DAC可用于传感器激励。这几位控制激励电流的大小。IDAC要求内部基准源必须开启.

000 = off (default)

001 = 50mA

010 = 100mA

011 = 250mA

100 = 500mA

101 = 750mA

110 = 1000mA

111 = 1500mA

 

 

IDAC1 可编程电流源控制寄存器1

IDAC1 - ADDRESS 0Bh                                                                                                                                                 RESET VALUE = FFh

DEVICE

BIT 7

BIT 6

BIT 5

BIT 4

BIT 3

BIT 2

BIT 1

BIT 0

ADS1248

I1DIR3

I1DIR2

I1DIR1

I1DIR0

I2DIR3

I2DIR2

I2DIR1

I2DIR0

ADS1247

0

0

I1DIR1

I1DIR0

0

0

I2DIR1

I2DIR0


ADS1247/8有2路IDAC,可以连接到IEXC1,IEXC2或任意模拟输入。

Bits 7:4       I1DIR3:0 这些位选择第一电流源DAC输出引脚。

0000 = AIN0

0001 = AIN1

0010 = AIN2

0011 = AIN3

0100 = AIN4 (ADS1248only)

0101 = AIN5 (ADS1248only)

0110 = AIN6 (ADS1248only)

0111 = AIN7 (ADS1248only)

10x0 = IEXT1 (ADS1248only)

10x1 = IEXT2 (ADS1248only)

11xx = 关闭(default)

Bits 3:0       I2DIR3:0 这些位选择了第二电流源DAC的输出引脚

0000 = AIN0

0001 = AIN1

0010 = AIN2

0011 = AIN3

0100 = AIN4 (ADS1248only)

0101 = AIN5 (ADS1248only)

0110 = AIN6 (ADS1248only)

0111 = AIN7 (ADS1248only)

10x0 = IEXT1 (ADS1248only)

10x1 = IEXT2 (ADS1248only)

11xx = 关闭(default)

 

GPIOCFG—GPIO 配置寄存器,用于配置GPIO与模拟输入引脚复用功能

GPIO0 复用 REFP0

GPIO1 复用 REFN0

GPIO2 复用 AIN2

GPIO3 复用 AIN3

GPIO4复用 AIN4 (ADS1248)

GPIO5复用 AIN5 (ADS1248)

GPIO6复用 AIN6 (ADS1248)

GPIO7复用 AIN7 (ADS1248)

 

GPIOCFG - ADDRESS 0Ch                                                                                                                                           RESET VALUE = 00h

DEVICE

BIT 7

BIT 6

BIT 5

BIT 4

BIT 3

BIT 2

BIT 1

BIT 0

ADS1248

IOCFG7

IOCFG6

IOCFG5

IOCFG4

IOCFG3

IOCFG2

IOCFG1

IOCFG0

ADS1247

0

0

0

0

IOCFG3

IOCFG2

IOCFG1

IOCFG0

Bits 7:0       IOCFG7:0 GPIO与模拟输入复用设置,注意ADS1248支持所有GPIO,但是ADS1247只支持GPIO1-GPIO3,也就是BIT0-BIT3

0 = 该引脚用作模拟输入(default)

1 = 该引脚用作 GPIO pin

 

 

GPIODIR—GPIO方向寄存器

GPIODIR - ADDRESS 0Dh                                                                                                                                             RESET VALUE = 00h

DEVICE

BIT 7

BIT 6

BIT 5

BIT 4

BIT 3

BIT 2

BIT 1

BIT 0

ADS1248

IODIR7

IODIR6

IODIR5

IODIR4

IODIR3

IODIR2

IODIR1

IODIR0

ADS1247

0

0

0

0

IODIR3

IODIR2

IODIR1

IODIR0

Bits 7:0       IODIR7:0 用于控制GPIO方向,注意ADS1248支持所有GPIO,但是ADS1247只支持GPIO1-GPIO3,也就是BIT0-BIT3

0 = GPIO输出模式 (default)

1 = GPIO  输入模式

 

 

GPIODAT—GPIO数据寄存器

GPIODAT - ADDRESS 0Eh                                                                                                                                            RESET VALUE = 00h

DEVICE

BIT 7

BIT 6

BIT 5

BIT 4

BIT 3

BIT 2

BIT 1

BIT 0

ADS1248

IODAT7

IODAT6

IODAT5

IODAT4

IODAT3

IODAT2

IODAT1

IODAT0

ADS1247

0

0

0

0

IODAT3

IODAT2

IODAT1

IODAT0

Bits 7:0       IODAT7:0 如果对应GPIO设置为输出,则写入对应bit会输出到相应引脚,如果对应GPIO设置为输入,则读取对应bit对应输入值,注意ADS1248支持所有GPIO,但是ADS1247只支持GPIO1-GPIO3,也就是BIT0-BIT3




  SPI命令

一些指令是独立的命令(例如,复位),而另一些则需要额外的字节(例如,写命令需要计数和数据字节)

 

操作数说明:

n =读写寄存器的数量(要读取的字节 – 1)

r = 寄存器 (0 to 15)

x = 不关心

SPI 命令列表

 

COMMAND TYPE

COMMAND

DESCRIPTION

1st COMMAND BYTE

2nd COMMAND BYTE

 

 

 

System Control

WAKEUP

退出睡眠模式

0000 000x (00h, 01h)

 

SLEEP

进入睡眠模式

0000 001x (02h, 03h)

 

SYNC

同步AD转换

0000 010x (04h, 05h)

0000-010x (04,05h)

RESET

复位

0000 011x (06h, 07h)

 

NOP

             空指令

1111 1111 (FFh)

 

 

 

Data Read

RDATA

读取数据

0001 001x (12h, 13h)

 

RDATAC

连续读取数据

0001 010x (14h, 15h)

 

SDATAC

停止读取数据

0001 011x (16h, 17h)

 

Read Register

RREG

读寄存器 rrrr

0010 rrrr (2xh)

0000_nnnn

Write Register

WREG

写寄存器rrrr

0100 rrrr (4xh)

0000_nnnn

 

 

Calibration

SYSOCAL

系统失调校准

0110 0000 (60h)

 

SYSGCAL

系统增益校准

0110 0001 (61h)

 

SELFOCAL

自校正

0110 0010 (62h)

 

 

联系我们
  • 公司地址:郑州高新技术开发区合欢街138号
  • 电话:0371-66608270
  • 技术支持:0371-86559701-360
  • 销售服务:0371-86559701-688
  • 传       真:0371-66608270
  • 邮       箱:QQ邮箱:273530218
  • 在线客服