Protocentral / Protocentral_ADS1220

ADS1220 arduino library
Other
44 stars 45 forks source link

external vref #7

Open nydahl98 opened 5 years ago

nydahl98 commented 5 years ago

How do i set external vref?

joicetm commented 5 years ago

Hi, you can set analog supply, REFP0-REFN0 or REFP1-REFN1 as your voltage reference. please refer to datasheet section8.3.6 on page number 29 for more information.

you can set this by writing to the config2 register, bits 6,7 selects the external source.

00 : Internal 2.048-V reference 01 : External reference REFP0 and REFN0 10 : External reference AIN0/REFP1 and AIN3/REFN1 11 : Analog supply (AVDD – AVSS)

You can use void Protocentral_ADS1220::writeRegister() function to write the value to config2 reg.

also you should change the macro #define VREF 2.048 in .ino file to the correct value you have used.