Shop OBEX P1 Docs P2 Docs Learn Events
74hc595n serial to parallel with LED 7seg cathod — Parallax Forums

74hc595n serial to parallel with LED 7seg cathod

crazyrobotgirlcrazyrobotgirl Posts: 32
edited 2013-08-30 09:46 in Propeller 1
I just purchased 5 74hc595n, and 5 LED 7 seg cathods. I am trying to read the values of a pot trew these circuits. Has anyone done anthing
like this or close?

Comments

  • tonyp12tonyp12 Posts: 1,951
    edited 2013-08-29 09:21
    You can not read any values with hc595, it's an output ic.
    So read the pot the way showed in other examples and then send 40bits on a data pin
    while you also move clock pin low-to-high then end with latch pin going low-to-high.
  • PublisonPublison Posts: 12,366
    edited 2013-08-29 10:52
    You can use a MCP3208 Analog-to-Digital chip to monitor up to eight channels of input.

    http://obex.parallax.com/object/371
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-08-29 11:39
    Hi Crazy,

    First off, I think you've got your terminology a bit off. I assume you have some 7-segment LED displays. Are these "common cathode" displays? Is each digit separate from the others?

    A link to the item would help.

    I also assume you want to be able to read the position of a pot and display the value on the LED displays.

    We'll worry about how to read from the pot later.

    You can certainly use your 74HC595 chips to drive the LEDs in the displays. In my 6" 7-segment display project, I used high power shift registers to control the LEDs. The displays were common anode but the code to control them should also work with common cathode since you shift registers can source current.

    In your PM you mentioned the displays in my encoder project. I that case, I was using these serial LED displays from SparkFun. They're really easy to use. You just send what you want displayed through a serial connection. I generally use the little serial displays while debugging. They're kind of expensive and I don't want to use them as a permanent part of a project.

    I'm sure there are many code examples of driving 7-segment displays with '595 chips. I'm pretty sure I have a couple besides the code used in my large display. I'll take a look through my code to see what examples I can find. Hopefully someone else will have some good suggestions on '595 code for driving 7-segment displays.

    One thing that will be good to know is if you plan to light each digit continuously or do you want to multiplex the digits? If you want to multiplex the displays you'll need some way of controlling which cathode is turned on.

    Since you have five '595 chips, I'm guessing you don't want to multiplex the displays.

    Do you have plans on how to read the pot? RC decay? Delta-sigma? External ADC chip?
  • crazyrobotgirlcrazyrobotgirl Posts: 32
    edited 2013-08-30 08:32
    It does seem that I left out quit a bit of info. These are the & segments that I am using http://www.parallax.com/product/350-00027. Duane you hit the nail with the hammer. I want to read the values of a pot threw a MCP3208 chip, and display them on my 5 seven segment led.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-08-30 09:46
    It does seem that I left out quit a bit of info. These are the & segments that I am using http://www.parallax.com/product/350-00027. Duane you hit the nail with the hammer. I want to read the values of a pot threw a MCP3208 chip, and display them on my 5 seven segment led.

    The only '595 to 7-segment code I could find was in my 6" clock project I linked to earlier. If you want to attempt to decypher the code for my large digital clock you'll want to look in the "Display" method. It took me a bit to figure out what I was doing and how I was sending bits to the '595 chips. It would probably be easier to write your own code to do what you want than to try to adapt what I wrote for your purposes.

    I'd break your project up into easier to manage parts. Figure out how to control LEDs with a '595 chip. I used the object "74HC595_MultiPWM.spin" from the OBEX to control the shift registers in my project. Once you can light some LEDs with a shift register try to get it to display numbers on the 7-segment display.

    If you haven't used the MCP3208 chip in other projects, I'd suggest starting with displaying the results to a terminal window to start with. Once you've figured out how to use the ADC chip, then switch to displaying the output to your LED display.

    There may be some other '595 to 7-segment code on in the OBEX or forum. I find it easier to search the forum with Rich's search page (there's a link to it at the top of post #1 in my index) than using the forum search feature.
Sign In or Register to comment.