Esempio n. 1
0
        public AdDaBoard(SpiDevice spiDevice)
        {
            _spiCommController = new SpiCommController(spiDevice);

            _ads1256SpiComm = _spiCommController.Create(AdDaBoardPins.Ads1256SpiChipSelectPinNumber);
            _dac8552SpiComm = _spiCommController.Create(AdDaBoardPins.Dac8552SpiChipSelectPinNumber);

            Input  = new Ads1256(_ads1256SpiComm, AdDaBoardPins.Ads1256DataReadyPinNumber);
            Output = new Dac8552(_dac8552SpiComm);
        }
Esempio n. 2
0
        public Ads1256(ISpiComm spiComm, int dataReadyPinNumber)
        {
            SpiComm = spiComm;

            _dataReadyPin = GpioController.GetDefault().OpenPin(dataReadyPinNumber);
            _dataReadyPin.SetDriveMode(GpioPinDriveMode.InputPullUp);

            _currentRegisters = SpiComm.Operate(ReadRegisters);

            Gain                 = _currentRegisters.Gain;
            DataRate             = _currentRegisters.DataRate;
            DetectCurrentSources = _currentRegisters.DetectCurrentSources;
            AutoSelfCalibrate    = _currentRegisters.AutoCalibrate;
            UseInputBuffer       = _currentRegisters.UseInputBuffer;
        }
Esempio n. 3
0
 public RegisterManager(ISpiComm spiComm, bool debugLog = false)
 {
     _spiComm  = spiComm;
     _debugLog = debugLog;
 }
Esempio n. 4
0
 public Dac8552(ISpiComm spiComm)
 {
     SpiComm = spiComm;
 }