Common Anode Shift Register (Similar to MAX7219)

Hi...

I need a Common ANODE Shift Register to drive 8-Digit (2 x 4-Digit) 7-Segment. With just one MAX7219, using 3 I/O Pins, i could do that, but the problem is my 7-Segments are common anode. What kind of shift register should i use? Or should i buy the 7-segments in common cathode?

Thanks.
Gabriel.

The MAX7219 is not a shift register it is an LED driver.
So do you want a shift register or do you want a common Anode version of the MAX7219?

Just use the MAX7219. Connect the anodes to the "segment" lines, and the cathodes to the "digit" lines.

No problem.

The code becomes a bit more tricky - each of the data registers now contains all the corresponding segments of every digit, and you cannot use the 7-segment decoder function built into the MAX7219, but that would restrict you in what patterns you can display anyway.

All you need to do is to keep an array in memory of what you want each digit to show and read it one bit from each of the eight digits at a time as you shift the data into the MAX7219. It means you have to refresh all data registers to update any one digit, but that hardly matters.

Grumpy_Mike:
The MAX7219 is not a shift register it is an LED driver.
So do you want a shift register or do you want a common Anode version of the MAX7219?

Sorry about the mistake. Won't happens again :stuck_out_tongue:

Actually, i need want a common anode version of the MAX7219. I think the idea from Paul__B should be work. But if you know a common ANODE version of the MAX7219, i will use that in my next project and i'll be glad if you tell me the name of this common Anode LED Driver :slight_smile:

Paul__B:
Just use the MAX7219. Connect the anodes to the "segment" lines, and the cathodes to the "digit" lines.

No problem.

The code becomes a bit more tricky - each of the data registers now contains all the corresponding segments of every digit, and you cannot use the 7-segment decoder function built into the MAX7219, but that would restrict you in what patterns you can display anyway.

All you need to do is to keep an array in memory of what you want each digit to show and read it one bit from each of the eight digits at a time as you shift the data into the MAX7219. It means you have to refresh all data registers to update any one digit, but that hardly matters.

Just to be sure, I should wire PIN14[SEGA] for Digit 1-PIN; PIN16[SEGB] for Digit 2-PIN ... PIN22[SEGDP] for Digit 8-PIN, then PIN2[DIG0] for Segment A-PIN, PIN11[DIG1] for Segment B-PIN (...) PIN5[DIG6] for Segment F-PIN (I don't need to light the Point " . ") ? Is that correct?!

Thanks guys for the help!

Hi,

A 7 segment led driver that is designed for common anode is saa1064. It has some advantages and disadvantages compared to max7219.

Disadvantages:
Large chip
only runs 4 digits so 2 chips would be needed
2 external transistors per chip needed

Advantages:
Can run with voltages up to 15V for larger displays
brighter display due to 1:2 multiplex ratio
i2c bus interface

Paul

BielMB:
Actually, i need want a common anode version of the MAX7219. I think the idea from Paul__B should be work.

No, it's not "should be work", it's a fundamental principle of electricity, it does work. It is just a matter of re-ordering bits in software - but that it precisely why you use a microcontroller/ computer - you use software to make things match the hardware.

BielMB:
Just to be sure, I should wire PIN14[SEGA] for Digit 1-PIN; PIN16[SEGB] for Digit 2-PIN ... PIN22[SEGDP] for Digit 8-PIN, then PIN2[DIG0] for Segment A-PIN, PIN11[DIG1] for Segment B-PIN (...) PIN5[DIG6] for Segment F-PIN (I don't need to light the Point " . ") ? Is that correct?!

That sounds about right.

Wire it up, work out the software, and use it.

You don't need to light the decimals? Why not? Two wires and it's done. There are actually a couple of other tricks - instead of the decimals, you can control eight separate indicator LEDs. Many commercial designs however, use the decimals themselves as separate indicators with lettering adjacent to denote the meaning of each. Or you can turn the displays upside down (since you are not using the internal BCD-to-decimal decoder) and use them along the top as indicators.

The other cunning trick, is to wire the decimal point drive and now "digit" lines to a separate, common cathode, ninth digit. Yes, more code to make it work but as I say, that it precisely why you use a microcontroller.

PaulRB:
Hi,

A 7 segment led driver that is designed for common anode is saa1064. It has some advantages and disadvantages compared to max7219.

Paul

Thanks bro! I'll look around for it :wink:

Paul__B:
No, it's not "should be work", it's a fundamental principle of electricity, it does work. It is just a matter of re-ordering bits in software - but that it precisely why you use a microcontroller/ computer - you use software to make things match the hardware.
That sounds about right.

Wire it up, work out the software, and use it.

You don't need to light the decimals? Why not? Two wires and it's done. There are actually a couple of other tricks - instead of the decimals, you can control eight separate indicator LEDs. Many commercial designs however, use the decimals themselves as separate indicators with lettering adjacent to denote the meaning of each. Or you can turn the displays upside down (since you are not using the internal BCD-to-decimal decoder) and use them along the top as indicators.

The other cunning trick, is to wire the decimal point drive and now "digit" lines to a separate, common cathode, ninth digit. Yes, more code to make it work but as I say, that it precisely why you use a microcontroller.

Well, I need to display only integer numbers, that's why i don't need to light up the digit, but i like the idea of using to control some LEDs. I'll try that.

Thanks again for the help! :wink:

Common anode version of MAX7219:
http://www.maximintegrated.com/en/products/power/display-power-control/ICM7218.html#popuppdf
http://www.digikey.com/product-search/en?vendor=0&keywords=icm7218
Pricey - MAX7219 from www.taydaelectronics.com is $3.09.
Not genuine parts (I asked Maxim, they told me tayda was not an authorized reseller); the ones I have bought have all worked.

CrossRoads:
Common anode version of MAX7219:
http://www.maximintegrated.com/en/products/power/display-power-control/ICM7218.html#popuppdf
http://www.digikey.com/product-search/en?vendor=0&keywords=icm7218
Pricey - MAX7219 from www.taydaelectronics.com is $3.09.
Not genuine parts (I asked Maxim, they told me tayda was not an authorized reseller); the ones I have bought have all worked.

Thanks CrossRoad!

I was taking a look in this ICM7218a. It has a few more pins. What is this used for? Do i need to use this in some more Arduino I/O pins, or can i leave it wired with nothing?

Thank you!
Gabriel.

I don't know, read the pins description in the datasheet. I am sure they need to be controlled somehow even if not used - tied high or low. Not floating for sure.

Hmm... that icm7218a seems to use many more Arduino pins to drive it, compared to max7219, but doesn't seem to offer any advantages for your extra pins. In fact it seems to have fewer features than max7219, such as no brightness control.

I would go with Paul__B's idea if your displays are small (Vf <5V) or my idea if your displays are large (Vf > 5V).

CrossRoads:
I don't know, read the pins description in the datasheet. I am sure they need to be controlled somehow even if not used - tied high or low. Not floating for sure.

Thanks buddy, I'll take a deep look into the DataSheet and some examples!

PaulRB:
Hmm... that icm7218a seems to use many more Arduino pins to drive it, compared to max7219, but doesn't seem to offer any advantages for your extra pins. In fact it seems to have fewer features than max7219, such as no brightness control.

I would go with Paul__B's idea if your displays are small (Vf <5V) or my idea if your displays are large (Vf > 5V).

Well, since the 7-segment display is only 3.3V (Vf typical / 4V Max), i'll try Paul__B's idea. But i really appreciate your help! For my next project, i'll think about using those SAA1064! :wink:

Thanks again, guys!

Great.

Coding your sketch to use the max chip with common anode displays will be quite tricky, unless you are already good at "bit twiddling". I don't know of any good example code on the forum or Web, so come back to this thread when you need some support with that.

PaulRB:
Coding your sketch to use the max chip with common anode displays will be quite tricky, unless you are already good at "bit twiddling". I don't know of any good example code on the forum or Web, so come back to this thread when you need some support with that.

Fine with me - don't mind the exercise as I have done some playing around with the matrix arrays. In regard to which, I would be surprised if Marco had not done this already as he certainly has with the matrices.

@BielMB, Can U share the code. Even I am sucked with the same problem and came through this topic. Good Info guys, Thankyou All.