{solved] LTC2400 stayed too long to the drawer

Hello
I had a sketch slightly modified from a published demo (and hardwre) running about 2 years ago.
These days I tried to awake it…but it refuses. Here is the code:

// RUN ON UNO

//24bit ADC IC: LTC2400



#include <Stdio.h>
#include <stdlib.h>
#include <LCD.h>
#include <LiquidCrystal_I2C.h>
#include <Wire.h>

#ifndef cbi
#define cbi(sfr, bit)     (_SFR_BYTE(sfr) &= ~_BV(bit))
#endif
#ifndef sbi
#define sbi(sfr, bit)     (_SFR_BYTE(sfr) |= _BV(bit))
#endif

#define LTC_CS 2         // LTC2400 Chip Select Pin  on Portb 2
#define LTC_MISO 4      // LTC2400 SDO Select Pin  on Portb 4
#define LTC_SCK  5       // LTC2400 SCK Select Pin  on Portb 5
LiquidCrystal_I2C  lcd(0x27, 2, 1, 0, 4, 5, 6, 7); // 0x27 is the I2C bus address for an unmodified backpack
byte zero = 0x00; //workaround for issue #527
float volt;
//float v_ref = 4.094;        // Reference Voltage, 5.0 Volt for LT1021 or 3.0 for LP2950-3
float v_ref = 4.8;
long int ltw = 0;         // ADC Data ling int
int cnt;                  // counter
byte b0;                  //
byte sig;                 // sign bit flag
char st1[20];             // float voltage text
int in = 6;
int count = 0;
unsigned long start1 = 0;
unsigned long stop1 = 0;
String txt = "   ";
int x;
int y;

void setup() {

  cbi(PORTB, LTC_SCK);     // LTC2400 SCK low
  sbi (DDRB, LTC_CS);      // LTC2400 CS HIGH

  cbi (DDRB, LTC_MISO);
  sbi (DDRB, LTC_SCK);
  // ***************************************
  Serial.begin(115200);
  Wire.begin();
  lcd.begin (16, 2); // for 16 x 2 LCD module
  lcd.setBacklightPin(3, POSITIVE);
  lcd.setBacklight(HIGH);

  // init SPI Hardware
  sbi(SPCR, MSTR) ; // SPI master mode
  sbi(SPCR, SPR0) ; // SPI speed
  sbi(SPCR, SPR1); // SPI speed
  sbi(SPCR, SPE);  //SPI enable
  pulse();
}

/********************************************************************/
void loop() {

  delay(1);
  cbi(PORTB, LTC_CS);            // LTC2400 CS Low
  delayMicroseconds(1);
  if (!(PINB & (1 << 4))) {    // ADC Converter ready ?
    //    cli();
    ltw = 0;
    sig = 0;

    b0 = SPI_read();             // read 4 bytes adc raw data with SPI
    if ((b0 & 0x20) == 0) sig = 1; // is input negative ?
    b0 &= 0x1F;                  // discard bit 25..31
    //   Serial.println(b0, BIN);
    ltw |= b0;
    ltw <<= 8;
    b0 = SPI_read();
    //   Serial.println(b0, BIN);
    ltw |= b0;
    ltw <<= 8;
    b0 = SPI_read();
    //    b0 = 00100101;
    //   Serial.println(b0, BIN);
    ltw |= b0;
    ltw <<= 8;
    b0 = SPI_read();
    //    Serial.println(b0, BIN);
    ltw |= b0;

    delayMicroseconds(1);
    sbi(PORTB, LTC_CS); // LTC2400 CS hi
  if (sig) ltw |= 0xf0000000;    // if input negative insert sign bit
    ltw = ltw / 16;                // scale result down , last 4 bits have no information
    volt = ltw * v_ref / 16777216; // max scale
    Serial.println(ltw);
    Serial.println(volt);
    char tmp[10];
    dtostrf(volt, 6, 6, tmp);
    tmp[8] = 'V';
    tmp[9] = '\n';
    //Serial.print(cnt++);
    lcd.setCursor(0, 0);
    //volt = volt * 1000000;
    lcd.print(volt);
    Serial.println(volt);

  }
  delay(1);
}


/********************************************************************/
void pulse()
{
  count = 0;
  start1 = millis();
  stop1 = start1 + 1000;

  while (stop1 > (millis()))
  {
    while (((digitalRead(in) == LOW)) && (stop1 > (millis())))
    {

      //   delay(100);
    }
    count++;
    while (((digitalRead(in) == HIGH)) && (stop1 > (millis())))
    {
    }
  }
}

byte SPI_read()
{
  SPDR = 0;
  while (!(SPSR & (1 << SPIF))) ; /* Wait for SPI shift out done */
  return SPDR;
}
/********************************************************************/
//  printFloat from  tim / Arduino: Playground
// printFloat prints out the float 'value' rounded to 'places' places
//after the decimal point
void printFloat(float value, int places) {
  // this is used to cast digits
  int digit;
  float tens = 0.1;
  int tenscount = 0;
  int i;
  float tempfloat = value;

  // if value is negative, set tempfloat to the abs value

  // make sure we round properly. this could use pow from
  //<math.h>, but doesn't seem worth the import
  // if this rounding step isn't here, the value  54.321 prints as

  // calculate rounding term d:   0.5/pow(10,places)
  float d = 0.5;
  if (value < 0)
    d *= -1.0;
  // divide by ten for each decimal place
  for (i = 0; i < places; i++)
    d /= 10.0;
  // this small addition, combined with truncation will round our

  tempfloat +=  d;

  if (value < 0)
    tempfloat *= -1.0;
  while ((tens * 10.0) <= tempfloat) {
    tens *= 10.0;
    tenscount += 1;
  }

  // write out the negative if needed
  if (value < 0)
    Serial.print('-');

  if (tenscount == 0)
    Serial.print(0, DEC);

  for (i = 0; i < tenscount; i++) {
    digit = (int) (tempfloat / tens);
    Serial.print(digit, DEC);
    tempfloat = tempfloat - ((float)digit * tens);
    tens /= 10.0;
  }

  // if no places after decimal, stop now and return
  if (places <= 0)
    return;

  // otherwise, write the point and continue on
  Serial.print(',');

  for (i = 0; i < places; i++) {
    tempfloat *= 10.0;
    digit = (int) tempfloat;
    Serial.print(digit, DEC);
    // once written, subtract off that digit
    tempfloat = tempfloat - (float) digit;
  }
}

Ref is tied to Vcc
Output is steady to -4.80, no matter if it is connected to input of 2400 or not, no matter for any voltage 0-Vcc
Is there something wrong with the code (ie did I made a change 2 years ago and didnot verify operation)?

OMG! Im getting old....

#define LTC_CS 2         // LTC2400 Chip Select Pin  on Portb 2
#define LTC_MISO 4      // LTC2400 SDO Select Pin  on Portb 4
#define LTC_SCK  5       // LTC2400 SCK Select Pin  on Portb 5

these are pins 10, 12, 13 (not 2, 4, 5)

So does that suggest it's working now?

shot at "bool's eye"

edit that means the hardware was connected to digital pins 2-4-5 instead of (correct) 10-12-13.

but it's not displaying correct values. Anyway, I can handle it now