Shop OBEX P1 Docs P2 Docs Learn Events
Question on 74HC595 Shift Register — Parallax Forums

Question on 74HC595 Shift Register

tigershark35tigershark35 Posts: 60
edited 2006-10-13 19:12 in BASIC Stamp
Hi.· I need to turn on and off a number of leds and I want to do it by loading a binary number into a shift register. The question is, if the 595 has a 0 on a pin, will it sink current from the LED to ground as shown in this diagram. I have a matrix led that will need to have the rows and columns turned on and off to combine red and green LED on a bar graph.· I know I can turn on the + columuns using the shift register, but I need a way to turn on and off a sink the current of the rows.

Thanks JG
324 x 310 - 18K

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2006-10-13 19:01
    The 74HC595 will sink current (by connected the I/O pin to ground) when the bit is set to zero and it will also source current (by connecting the I/O pin to +5V) when the bit is set to one. Connect the other end of the LED through a current limiting resistor to a 2nd 74HC595 pin. Only when the first bit/pin is set to zero and the new bit/pin is set to one will the LED light. If you have a 4x4 matrix, you can use 1/2 of the 595 for the rows and the other 1/2 for the columns. The row bits (cathodes) should all be set to one except for the pin you want to be active. The column bits (anodes) should all be set to zero except for the pin you want to be active.
  • metron9metron9 Posts: 1,100
    edited 2006-10-13 19:11
    Darn Mike you beat me to the punch again! but Ill post it anyway.

    Datasheets from 4 mfgs [noparse]:http:[/noparse]//www.datasheetcatalog.com/datasheets_pdf/7/4/H/C/74HC595.shtml

    From the datasheet for ON semiconductors version MC74HC595A

    I could not find ratings for the Philips version in their datasheet.

    "DC Input Current, per Pin ± 20 mA"

    "DC Output Current, per Pin 35 mA"

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think outside the BOX!
  • tigershark35tigershark35 Posts: 60
    edited 2006-10-13 19:12
    Thanks.

    Here is the LED that I am using. I plan to get a voltage measurment and then disply a battery voltage dropping using this LED bar graph. I will have to have some Red green and amber similiar to what is shown. I will have to strobe it rapidly and thought that I could have shift register on the top for the columns sourcing one col at a time, and at the same time I would change the value in a shift register to sink the row(s) that will correspond to the Col being activated. I guess I could use transistors on the rows run by the output of a shift register. I can load two bytes to the registers in series and then latch and do it again for the next row/col, etc. That is about the only way I have been able to figure out how to do it.

    http://www.primeled.com/2005_Brochure/7.html

    Thanks
  • tigershark35tigershark35 Posts: 60
    edited 2006-10-13 19:12
    Thanks.

    Here is the LED that I am using. I plan to get a voltage measurment and then disply a battery voltage dropping using this LED bar graph. I will have to have some Red green and amber similiar to what is shown. I will have to strobe it rapidly and thought that I could have shift register on the top for the columns sourcing one col at a time, and at the same time I would change the value in a shift register to sink the row(s) that will correspond to the Col being activated. I guess I could use transistors on the rows run by the output of a shift register. I can load two bytes to the registers in series and then latch and do it again for the next row/col, etc. That is about the only way I have been able to figure out how to do it.

    http://www.primeled.com/2005_Brochure/7.html

    Thanks
Sign In or Register to comment.