ARD-LTC1867 (16bit ADC) compatibility with teensy 4.1

Status
Not open for further replies.

khoadley

Member
I am hoping to use the ARD-LTC1867 ADC with a teensy 4.1. I had previously tried with a teensy 3.6 (prior post) but that got side tracked and I am now picking up the project again. I have the teensy connected on pins 18 and 19 (SCL and SDA) with the ADC. I am not sure if I need any other connections between the two devices. Below is the code I am attempting to use. I do not seem to be getting any signal. The code works fine on an arduino uno, but no luck thus far on the teensy. Any and all help would be greatly appreciated. Thanks again!

Code:
#include <SPI.h>
#include <Wire.h>
#include "Ard1863.h"

const int Col0 = 6;

Ard186x ard186xboard1;
//unsigned long sampleStartTimestamp;

void setup() 
{
  pinMode(Col0, OUTPUT);
  Serial.begin(9600);

  //  Wire.begin();
  SPI.begin();
  ard186xboard1.setFastSPI(1);
  ard186xboard1.begin(DEVICE_LTC1867, ARD186X_EEP_ADDR_ZZ,3);
  //ard186xboard1.begin(DEVICE_LTC1867, ARD186X_EEP_DISABLE,3);
  ard186xboard1.ltc186xChangeChannel(LTC186X_CHAN_SINGLE_0P,1);
}

void loop() 
{   int i = 0;
    unsigned int stuck;
    float ttt = 0;
    for (i=0;i<10;i++)
    { // print the results to the serial monitor
      digitalWrite(Col0, HIGH);
      delayMicroseconds(3);
      stuck = ard186xboard1.ltc186xRead();
      digitalWrite(Col0, LOW);
      delayMicroseconds(10);
      ttt += stuck;
    }
    Serial.println(ttt/10);
    delay(5);
}
 
Status
Not open for further replies.
Back
Top