Shop OBEX P1 Docs P2 Docs Learn Events
serout help! — Parallax Forums

serout help!

msh5686msh5686 Posts: 70
edited 2012-02-01 04:56 in BASIC Stamp
Hi,

I am trying to use a 74hc164 chip to control a seven segment display. I have gotten it to work just fine with shiftout, but I am trying to learn the how to use serout for this application and am running into a wall. No matter what I seem to try, I can't seem to get anything on the display (haven't changed a thing physically since it worked with shiftout.) I will post an example of the code I am playing with if anyone wouldn't mind helping me out... I find the serout explanation in the help files a little vague. Thanks!

Mike
Yes, I am a nube

SEROUT_LED.bs2

Comments

  • ZootZoot Posts: 2,227
    edited 2012-01-31 15:20
    That device is a shift register that clocks data in... how were you planning to use SEROUT with such a device? SEROUT is for sending serial data transmissions without a clock line.
  • msh5686msh5686 Posts: 70
    edited 2012-01-31 18:29
    Can the clock pin not just be flipped high and low in the loop? I had thought of this issue, but was hoping the 74164 would still work for this application. Right now I just am attempting with one seven segment display, but need to increase it to 4 displays and chips.
  • Mike GreenMike Green Posts: 23,101
    edited 2012-01-31 21:24
    The 74HC164 is the wrong kind of device for what you want. It's a parallel to serial shift register designed (in this situation) as an input expander, like for reading switch settings when you don't have enough I/O pins. You want a serial to parallel shift register like the 74HC595. The SHIFTIN statement is intended to be used with devices like the 74HC164 while the SHIFTOUT statement is intended to be used with devices like the 74HC595. SERIN and SEROUT are for entirely different uses.

    Browse through the Nuts and Volts Columns. Go to the main Parallax webpage and click on the Resources tab. You'll see a link for the Nuts and Volts Columns index.

    Also look at the StampWorks Manual which has some examples of the use of both the 74HC164 and the 74HC595. You can download a variety of manuals and tutorials on the Downloads page.
  • msh5686msh5686 Posts: 70
    edited 2012-02-01 04:56
    Thanks for the clarification, much clearer now!
Sign In or Register to comment.