Is my Maxim Max7219 broken?

Hey there!

I am trying to get a 7-segment display to display numbers using the maxim 7219 chip and the LedControl Library using an arduino uno. I have tried every wiring diagram I can find online and still cant get anything to display.

I'm connecting uno pin 12 to max pin 1, uno pin 11 to max pin 13, uno pin 10 to max pin 12. I also currently have a 10 uf capacitor and a 100nf cap in parallel with my 5v and gnd. I have the suggested 10k resistor between max pin 18 and vcc. Ive tried putting pull down resistors on the clk and load lines but that didnt seem to help.

Here is the basic code I wrote:

#include "LedControl.h"
LedControl lc = LedControl(12,11,10, 1);

//Variables
int i = 0;

void setup() {
  Serial.begin(9600);
  lc.shutdown(0, false);
  lc.setIntensity(0, 2);
  lc.clearDisplay(0);
}

void loop() {
  while (i < 9) {
    Serial.println(i);
    lc.setDigit(0, 0, i, false);
    lc.setDigit(0, 1, i, false);
    lc.setDigit(0, 2, i, false);
    lc.setDigit(0, 3, i, false);
    delay(1000);
    ++i;
  }
  while (i > 0) {
        Serial.println(i);
    lc.setDigit(0, 0, i, false);
    lc.setDigit(0, 1, i, false);
    lc.setDigit(0, 2, i, false);
    lc.setDigit(0, 3, i, false);
    delay(1000);
    --i;
  }
}

My 7 segment will randomly flash and light up when its uploading the sketch but no action upon running my code. Is there a way to know if I have a bad chip or not? I have 2 and neither seem to be functional.

At my wits end, any help is very much appreciated.

Thanks!

Maybe, post a schematic not a frizzy thing showing all connections.

This is basically the schematic for my project. My data pins are currently different but I have tried the pins in this schematic with no success.

You have the intensity set pretty low, and a pretty high current set resistor.
Try raising the intensity, and lowering the resistor.
Are you sure you have a common cathode display?

Follow this tutorial to show 1234 on the MAX7219 driven CC7SD display unit in order to verify that the MAX7219 chip is not broken, After that tje chip could be driven using LedControl.h Library.

1. Build the following circuit of Fig-1. Current regulating resistor Rex1 could be made by putting 3x3.3k resistors in series]s or a single 10k resistor.
max7219-4Digit.png
Figure-1:

2. Upload the following sketch in Arduino UNO. There is no use of LedControl.h Library.

#include<SPI.h>
byte registerAddress[] = {0x0C, 0x09, 0x0A, 0x0B}; //control registers of MAX7219, see data sheets
byte registerData[] = {0x01, 0x00, 0x01, 0x07};    //data for control registers for initialization
//normal mode; no-decode;intensity;8-digit scan
byte dataArray[8];  //to hold cc-codes (no-decode format)
byte digitAddress[] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08};//DP0-DP7
byte lupTable[] = {0x7E, 0x30, 0x6D, 0x79, 0x33, 0x5B, 0x5F, 0x70,
                   0x7F, 0x7B, 0x77, 0x1F, 0x4E, 0x3D, 0x4F, 0x47
                  }; //0, 1, ...., E, F ; n0-decode cc-code see data sheets

void setup()
{
  pinMode(10, OUTPUT);  //LOAD Pin of MAX7219
  //-------------------
  SPI.begin();
  // bitSet(SPCR, 4);              //UNO is Master SPI
  //  SPI.setBitOrder(MSBFIRST);    //MSB_bit will be transferred first
  SPI.setClockDivider(SPI_CLOCK_DIV128); //TX rate = 16MHz/128 = 125 kbit
  //  SPI.setDataMode(SPI_MODE1);//MOSI is sampled at the rising edge of CLK
  //------------------------------------------------
  digitalWrite(10, LOW);      //Low at LOAD pin
  //---- dataArray update-----------------------------
  dataArray[0] = lupTable[1];   //no-decode cc-code of 1
  dataArray[1] = lupTable[2];   //n0-decode cc-code of 2
  dataArray[0] = lupTable[3];   //no-decode cc-code of 3
  dataArray[1] = lupTable[4];   //
  //-------------------------------------------------



  //---keep intializing the Mode of Operation------------
  for (int i = 0; i < 4; i++)
  {
    SPI.transfer(registerAddress[i]);
    SPI.transfer(registerData[i]);
    digitalWrite(10, LOW);
    digitalWrite(10, HIGH); //assert LH/LL on LOAD pin
    digitalWrite(10, LOW);
  }

  //--keep transferring the result/data----------------------
  for (int i = 0; i < 4; i++)
  {
    SPI.transfer(digitAddress[i]); //DPX position
    SPI.transfer(dataArray[i]);   //shows 1 on DP0-position, 2 on DP1, 3 on DP2, and 4 in DP3 positions
    digitalWrite(10, LOW);
    digitalWrite(10, HIGH);       //assert LH/LL on LOAD pin
    digitalWrite(10, LOW);
  }
}

void loop()
{

}

3. Check that 1234 has appeared on CC7SD display unit of Fig-1.

max7219-4Digit.png

I tried this circuit and code with 3 different setups. None work. I'm using the KYX-3461AS as my 7-segment. From what I can tell the polarity is going the correct way for the Max7219 to drive it but still no dice.

These chips and 7 seg's are easily 5-10 years old but I assume they should still work? They were given to me in a ziplock baggie. Are these chips particularly sensitive to static? Could their time in the plastic bag have killed them?

I think I'm going to order some new chips on amazon. Do the letters after the chip matter? Mine all currently say CNG on them.

Thanks!

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.