Playing with AD8801 and have some questions

I grabbed the code from here, http://jeremyblum.com/2011/02/20/ardu… and am trying it on a AD8801 - spec sheet - http://www.analog.com/static/imported-f … 1_8803.pdf -and it turns on the LEDs on outputs 1-4 no problem, voltage as it should be but outputs 5-8 are only going up in voltage to about 1.9 so the LEDs do not com on. I dont get it.

//Program by Jeremy Blum
//www.jeremyblum.com
//Changes LED brightness using voltag input instead of PWM

//Include SPI library
#include <SPI.h>


void setup()
{
  
  //Set Pin Direction
  //Again, the other SPI pins are configured automatically
  pinMode(SS, OUTPUT);
  
  //Initialize SPI
  SPI.begin();
  
}

//This will set 1 LED to the specififed level
void setLed(int reg, int level)
{
  digitalWrite(SS, LOW);
  SPI.transfer(reg);
  SPI.transfer(level);
  digitalWrite(SS, HIGH);
}

void loop()
{
  for(int i=0; i<=7; i++)
  {
    for (int j=50; j<=255; j++)
    {
      setLed(i,j);
      delay(20);
    }
    delay(500);
    for (int j=255; j>=50; j--)
    {
      setLed(i,j);
      delay(20);
    }
  }
}

thought I better give how I hooked up the AD8801.

Pin1 Vrefh 5V

Pin2 LED

Pin3 220 res to LED to Gnd

Pin4 220 res to LED to Gnd

Pin5 220 res to LED to Gnd

Pin6 220 res to LED to Gnd

Pin7 Arduino pin 10

Pin8 Gnd

Pin9 Arduino pin 11

Pin10 Arduino pin 13

Pin11 220 res to LED to Gnd

Pin12 220 res to LED to Gnd

Pin13 220 res to LED to Gnd

Pin14 220 res to LED to Gnd

Pin15 RS 5V

Pin16 Vdd 5V

The question isn’t why some LEDs didn’t come on but why any did. According to the specs, the output resistance of the DACs is 3k min. You might try measuring the open circuit voltages and see if they agree with your programming.

http://www.analog.com/static/imported-f … 1_8803.pdf

Voltage on output 1-4 goes up from .95V to 4.8V and back down. I would then expect to see the same from output 5-8.

I dont get the previous post.

msumrell:
I dont get the previous post.

It’s basic electronics 101.

For your purposes, just pretend each output pin has a 3K resistor attached to it.

Like Mac said, why any LEDs lit up…who knows… None of the LEDs should have lit up at all.