0

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.

2
  • You already have code, so what is the problem? Please tell us why your code doesn't work. Commented Dec 10, 2024 at 0:31
  • @PaulCornelius I explaind precisley what I am afraid of. Commented Dec 10, 2024 at 1:54

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.