cupstacker:
is there a specific diagram for 3 digit 11 pin?
Didn't you like the one I gave you?
cupstacker:
is there a specific diagram for 3 digit 11 pin?
Didn't you like the one I gave you?
cupstacker:
you have 8 pins on one side and 4 on the other where as i have 5 on one side and 6 on the other.. to me there is no comparison
Mine has 12 pins, and yours has 11. Mine has one more segment which would account for the extra pin. So yes, there's a comparison. And that's why you have datasheets, they tell you what is connected to what.
I just want to point out, before you get too bogged down, you can buy these things from eBay for $10.



You get 8 digits, the MAX7219 chip, the board, two capacitors and a resistor. Just solder it all together and you can display 8 digits, driven by four wires (Power, Ground, Data in, Clock).
You can even chain those boards together to get 16 digits:

that's pretty neat, but this project just involves only a 3 digit display.. nothing more fancy than that
all i know is i got this mess and don't know what to do with it ![]()
http://cdn.img42.com/183cf65cd9739615c8fc41f75e7eaf22.jpeg
thank you
MAX7219 expects to source current into 8 anodes and and sink current from 1 digit.
You have to add extra hardware to use common anode, see this application note:
what kind of extra hardware?
thank you
Read the datasheet - shows which type of transistors and how to connect them.
CrossRoads:
MAX7219 expects to source current into 8 anodes and and sink current from 1 digit.
You have to add extra hardware to use common anode, see this application note:
Using the MAX7219/7221 to Drive Higher Voltage or Current | Analog Devices
The display he has is a common cathode. It only matters anyway if you wish to use the character generator which is limited to digits 1 to 9 and the characters "-EHLP" - if you wish to define other characters, you cannot use the internal character generator anyway.
I have previously cited the MAX7219 data sheet which has the connection diagram on the first page, and the pin diagram for the display he has. It is only a matter of connecting the corresponding pins from one to the other, adding a 33k resistor as per the datasheet (and some bypass capacitors), and using the code Nick provided.
Paul__B:
It only matters anyway if you wish to use the character generator which is limited to digits 1 to 9 and the characters "-EHLP" - if you wish to define other characters, you cannot use the internal character generator anyway.
Whether or not you use the internal character generator does not affect the electrical characteristics of the chip. That internal generator just saves you having to code bit patterns into your code if you happen to only want digits and/or the other characters you mentioned.
giving up for now.. i said i was new to all this and right now it's just upsetting me and just making me want to stop for now. i don't know as much as any of you.
didn't know a 3 digit display and a chip would be so complicated to wire up and nobody can tell me where these wires go on the chip.. and i didn't even want the dots.. was even trying to make it easier, but guess not ![]()

thank you everyone for trying to help though
Overcoming the latest hurdle, understanding the package. Not all pins may exist (i.e. pin 6) - count the gap as pin if it is not there.
nobody can tell me where these wires go on the chip
What's wrong with Crossroad's schematic, all you have to do is identify the segment pins and the cathode pins on your display and modify the schematic accordingly.
So for example CR's drawing shows seg A on pin 1, you find where seg A is on your display and put the wire to that instead. etc etc.
Rob
i think i got it.. took me some time..
if that's right, now i need to know how to connect the chip to arduino and find some temp code just to see it working.. i didn't connect DP (3) because i will not be using it.
max7219 pins 4 & 9 are ground and 19 is power
arduino pin 12 is connected to the MAX7219 pin 1
arduino pin 11 is connected to the CLK pin 13
arduino pin 10 is connected to LOAD pin 12
thank you
I saw you are using Arduino Mega which have a different pins for SPI
please check here SPI - Arduino Reference
Here are the code to test the MAX7219
#include <SPI.h>
const byte MAX7219_REG_NOOP = 0x0;
// codes 1 to 8 are digit positions 1 to 8
const byte MAX7219_REG_DECODEMODE = 0x9;
const byte MAX7219_REG_INTENSITY = 0xA;
const byte MAX7219_REG_SCANLIMIT = 0xB;
const byte MAX7219_REG_SHUTDOWN = 0xC;
const byte MAX7219_REG_DISPLAYTEST = 0xF;
void sendByte (const byte reg, const byte data)
{
digitalWrite (SS, LOW);
SPI.transfer (reg);
SPI.transfer (data);
digitalWrite (SS, HIGH);
} // end of sendByte
void setup ()
{
SPI.begin ();
sendByte (MAX7219_REG_SCANLIMIT, 2); // show 3 digits
sendByte (MAX7219_REG_DECODEMODE, 0xFF); // use digits (not bit patterns)
sendByte (MAX7219_REG_DISPLAYTEST, 0); // no display test
sendByte (MAX7219_REG_INTENSITY, 7); // character intensity: range: 0 to 15
sendByte (MAX7219_REG_SHUTDOWN, 1); // not in shutdown mode (ie. start it up)
} // end of setup
void number (const int num)
{
char buf [4];
sprintf (buf, "%3i", min (max (num, 0), 999));
// send all 3 digits
for (byte digit = 0; digit < 3; digit++)
{
byte c = buf [digit];
if (c == ' ' )
c = 0xF; // code for a blank
else
c -= '0';
sendByte (digit + 1, c);
}
} // end of number
unsigned int i;
void loop ()
{
number (i++);
delay (100);
} // end of loop
i'm new and have not used SPI yet, probably don't plan to.. if you the exact pins to use please let me know.. otherwise i'll just wait for some normal code
thank you
cupstacker:
i think i got it.. took me some time..if that's right, now i need to know how to connect the chip to arduino and find some temp code just to see it working.. i didn't connect DP (3) because i will not be using it.
max7219 pins 4 & 9 are ground and 19 is power
arduino pin 12 is connected to the MAX7219 pin 1
arduino pin 11 is connected to the CLK pin 13
arduino pin 10 is connected to LOAD pin 12i have my 3 buttons in place, just gotta connect them.. just need demo code to see it count or something so would someone would be so kind so i get to test this thing out please
The connection to MAX7219 is SPI, if you used Mega board then the connection will be
arduino pin 50 is connected to the MAX7219 pin 1
arduino pin 51 is connected to the CLK pin 13
arduino pin 53 is connected to LOAD pin 12
cupstacker:
i'm new and have not used SPI yet, probably don't plan to.. if you the exact pins to use please let me know.. otherwise i'll just wait for some normal code
To talk to MAX7219 you have used SPI, this was the code used to control the MAX7219, what "normal code" you talking?
all i see is 3 8's.. hmm, i could swear i wired it right. i'll look when i wake up again.. it's 3:30am going back to bed
thank you
BillHo:
To talk to MAX7219 you have used SPI, this was the code used to control the MAX7219, what "normal code" you talking?
I rather think he means code that does not use the SPI.
It is not necessary; perfectly easy to write the code to "bit bang" it.
I rather think he means code that does not use the SPI.
yep