Hello everyone, i am trying to use max7219cng to control LEDs. I don't understand what data should i transmit to the 7219cng. Can anyone help me figure out how should i use DataIn, Load(CS) and CLK pins of the 7219cng ? I don't want to use the library offered by Arduino, i want to make all the setup. Thanks !!
If you want to write your own code then you will need the MAX7219 datasheet here to explain the signal sequence and timing needed on the LOAD/CLK/DIN pins. It is pretty much a standard SPI signal so you could help yourself a bit by using the Arduino’s built in SPI hardware.
digitalWrite (csPin, LOW); // connect Arduino 10 Load SPI.transfer(registerAddress); // connect Arduino 13 to CLK, Arduino 11 to DIN SPI.transfer (dataToSendIn); digitalWrite (csPin, HIGH);
There are 5 registers you need to load in setup(), then send data to registers 1 to 8 that show up on the LEDs. I offer a little breakout board to make it easy to wire up discrete LEDs: http://www.crossroadsfencing.com/BobuinoRev17/ Male or female headers, or none if you want to solder direct to the board, are options.