74HC… are all the same?

Hello! I'm experimenting with a double digit seven segment display, and I was outraged by the amount of cables and resistor need to write a number! :D I thought something better can be made… and so I end up in gather information on shift register.

I find many examples suggesting some sort of 74HCXXX cmos… but I'm confused by all the different 74HC chips available.

For example: http://www.maplin.co.uk/hc-cmos-logic-74hcxxx-31817

Which is the difference between those chips? any one will be good to control a 2 digit seven segment display (CA) ?

Check out the 74HC4511: http://ics.nxp.com/products/hc/datasheet/74hc4511.pdf

Which is the difference between those chips?

Any chance of that question in English?

The link points to two horrendously overpriced ICs that do totally different things. When in doubt look at the data sheet. Try http://www.google.co.uk/url?sa=t&rct=j&q=74hc%207%20segment&source=web&cd=4&ved=0CDkQFjAD&url=http%3A%2F%2Fwww.ms.sapientia.ro%2Felektronika%2Ffileok%2Fd_kataloguslapok%2F74LS47.pdf&ei=Ss0mT9P_A9G68gPByoTGBw&usg=AFQjCNHUQmSIO0pL0MmdZendOiJ5FI5NyQ&cad=rja

The simple answer is no. Not every 74HCXXX chip is the same. However, all different brands of 1 model (74HC595, to take a well known one) should be the same.

Eih Mike let me know when we can talk in Italian, English is not my main language.

I know that page is terrible, that's why I'm asking here!

Maplin is the easiest way to have what I need immediately (I hate wait and pay for postage :) )

So, between the ones sold from Maplin which will be the best one to drive a 2 digit seven segment Display?

So, between the ones sold from Maplin which will be the best one to drive a 2 digit seven segment Display?

None of those chips are suitable for driving a seven segment display.

You can do it with one chip, one resistor, and a bit of wiring.

The MAX7219 will drive up to 8 x 7-segment displays (plus the decimal point) with only a single resistor to set the current. You communicate via SPI so you only need 3 wires between the chip and your Arduino, plus +5V and Gnd.

Sketch:

#include <SPI.h>
const byte SS = 10;  // omit this line for Arduino 1.0 onwards

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, 3);      // show 4 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 (int num)
  {
 
 char buf [5];
 sprintf (buf, "%4i", min (max (num, 0), 9999));
 
 // send all 4 digits
 for (byte digit = 0; digit < 4; 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 () 
 {
 i++;
 number (i);
 delay (100);
 }  // end of loop

I agree with Benji. —> NO.

Like : 74HC00, 74HC04, 74HC74, 74HC595 ← not the same. Different numbers.

To use one… It depend on the chip.

any one will be good to control a 2 digit seven segment display (CA)

The chip to display a ca, I did use a 74LS47 ( a BCD to seven segments display ). You may find a 74HC47 version. You still need limiting resistors ( 330 ohms to 470 ohms ) at each segments. I use a resistor network ( 330 ohms or 470 ohms ) chip in my project ( all resistors separated inside ) And to turn a digit on, you use a PNP transistor with a base resistor ( 1 k to 4.7 K ) and need a LOW signal to turn the transistor ON.

The 74HC595 or MAX7219 use a serial to parallel to show the display.

But it is still depend what you are planning to do, avaibility of the chip and price of the chip will determine the parts of your project.

Schematic for the MAX7219:

uhm… ok I'll see if I can find the MAX7219 in Maplin.

Thanks Nick for the schematics!

@Nick

I notice the 7 segments is a CC.

Yep. I documented it more here:

http://www.gammon.com.au/forum/?id=11516

You need a common-cathode 7-segment display for it (that chip) to work.

uhm ok, so I have a CA display http://www.us.kingbright.com/images/catalog/SPEC/DA56-11EWA.pdf

In Maplin (my local electronic store) I can not find the popular 74HC595 nor the MAX one…

So, I found this: http://www.maplin.co.uk/cmos-logic-hcf-hef-4000-series-31820

If you look at the specification tab you find: RS39 4021 8 Stage Static Shift Register QW48 4081 Quad 2-Input AND Gate

Is what I'm looking for? (a shift register equivalent to the 74HC595?)

massib80: 4021 8 Stage Static Shift Register

Is what I'm looking for? (a shift register equivalent to the 74HC595?)

The 4021 is a parallel-in/serial-out shift register. It's useful for extending the number of switch inputs to an Arduino but not for extending the number of outputs.

The 4015 (Dual 4-Stage Static Shift Register) is a parallel-out shift register (closer to what you want). It has two 4-bit stages which can be chained together to make one 8-bit shift register.

massib80:
In Maplin (my local electronic store) I can not find the popular 74HC595 nor the MAX one…

Digi-key have them in stock for $0.60. Don’t they deliver overnight in the USA?

It would be faster to order one than spend days trying to work out an alternative.

Or are you in the UK? Well they have a Digi-key too, it seems. Looks like a minimum order of 50 Pounds for free delivery, I don't know how much for delivery otherwise. Looks like they are 42p there.

I'm in Ireland… I can check how much they charge for postage.

Maplin confirmed that they don't have shift registers in stock… but they promise to order… I'll check that website now...

sad… shipping for 2 74HC595 is 12£

Have you tried Farnell?

they don't ship to IE seems, plus the minimum order is 20£