0

What does cmd=0x84 do in ADS7830 ADC. Its binary value is 10000100

class ADS7830(ADCDevice):
    def __init__(self):
        super(ADS7830, self).__init__()
        self.cmd = 0x84
        self.address = 0x4b # 0x4b is the default i2c address for ADS7830 Module.   
        
    def analogRead(self, chn): # ADS7830 has 8 ADC input pins, chn:0,1,2,3,4,5,6,7
        value = self.bus.read_byte_data(self.address, self.cmd|(((chn<<2 | chn>>1)&0x07)<<4))
        return value
2
  • 2
    have you tried searching for a datasheet for ADS7830?
    – Bravo
    Jan 4, 2022 at 10:23
  • 2
    Nothing to do with the Pi.
    – joan
    Jan 4, 2022 at 10:42

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.