MAX7219 to Display the Analog Port Value (five Minute Setup)

by BegMN in Circuits > Arduino

361 Views, 0 Favorites, 0 Comments

MAX7219 to Display the Analog Port Value (five Minute Setup)

COVER.JPG
MAX_1.JPG
MAX.JPG

The main purpose of this instructable is to demonstrate the ease at which the MAX7219 matrix display can be integrated into your next project (specifically 8x8x4) . A display provides the means through which the microprocessor can communicate it’s findings to us, so been able to SEE this data is important. In the GPS Clock project right here on instrucatables I needed to provide the data that the Arduino was interpreting from the GPS module in real time and also such that it would be visible when the strong South African Sun is upon us – the l.e.d. dot matrix was perfect. You can use this type display too... Let’s begin.

Supplies

Component_Module.JPG

There is only one component that this project uses which is a variable resistor and one module which is the MAX7219 8x8x4 led matrix you must also have a micro-controller , I’m using an Arduino Nano

List of Components/Modules

1 x Arduino Nano

1x variable resistor (actual value is of no consequence)

1x MAX7219 8x8x4 L.E.D MATRIX Display (packaged with female jumpers)

Additional male jumpers

The Circuit

CIRCUIT.jpg

The circuit becomes functional when the ends of the variable resistor are connected to Vcc and Ground supplied by the Nano while the centre pin of the resistor is connected to A0 of the Nano. The power rail to the MAX7219 is also connected to the Nano while pins CS;DIN and CLK of the display are connected to the Nano at 10;11 and 13 respectively.(The code declaration also describes the pin allocation of the MAX7219 ). (In the circuit diagram the leftmost display is pulled out so that you can see the pin assignments).

Code

The code attached consists of less than 30 lines and are truly easy to understand. I’ve thrown in text display which just happens to hint at my youtube channel @Circuit3-MNB, so you could easily amend the text to your needs. Since we don’t have to declare or set the pinMode for A0 when we turn the variable resistor (left or right) we get the values from 0 to 1023 been displayed on the MAX7219 and it looks lovely. I hope you enjoy this build and use it as a foundation for future creative endeavors.

Functionality

MAX_3.JPG
MAX_2_1.JPG
MAX_2.JPG

Depending which end of the variable resistor is connected to the power rail you will see either 1023 or 0.