For the code for ADS1263 I wanted to measure with voltage reference 3.3V which comes from Raspberry Pi. How command for this should look like?
The code is
import board
import busio
import ADS1263
import RPi.GPIO as GPIO
import time
def adcMonitor(conn):
ADC = ADS1263.ADS1263()
ADC.ADS1263_SetMode(1)
ADC.ADS1263_init_ADC1('ADS1263_14400SPS')
while True:
if (conn.recv() == "start"):
running = True
buffer = []
lastValue = 0
while (running == True):
# Should we stop?
if (conn.poll()):
if (conn.recv() == "stop"):
running = False
# Get value and make sure it's unique
nextValue = ADC.ADS1263_GetChannalValue(0)
if (nextValue != lastValue):
buffer.append(ADC.ADS1263_GetChannalValue(0))
# Send back the ADC readings
conn.send(buffer)
The measured signal is always positive and changes from 100 mV to 3 V, so I wanted to change voltage reference to more accurately measure and cover range of my signal. I read that the default setting range for differential measurment is -2.5V to 2.5V.