Shop OBEX P1 Docs P2 Docs Learn Events
Serial to digial? — Parallax Forums

Serial to digial?

Rob311Rob311 Posts: 83
edited 2008-01-03 17:13 in Robotics
I'm not really sure of the term, but i'm looking for something to translate a serial signal (from a stamp or pc) to digital outputs high/low and possibly some high/low inputs. It would be great of they were addressable and could daisy chain them together also. Any suggestions?

Comments

  • FranklinFranklin Posts: 4,747
    edited 2007-12-30 03:05
    The signals from the pc and the stamp are digital. What is it you are trying to accomplish? Perhaps that will help us help you.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • Rob311Rob311 Posts: 83
    edited 2007-12-30 03:17
    well i want to spit out a serial command from a pin on my stamp, or my pc serial port, and be able to control multiple leds or actuators. Kind of like a servo controller, only just high/low.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2007-12-30 04:02
    Rob -

    A serial to parallel shift register will probably do what you want. Just make sure not to exceed the output pin current rating. One SHIFTOUT (clk line + data line) can control up to 8 devices, but they can be cascaded.

    I hope that's what you were looking for.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Rob311Rob311 Posts: 83
    edited 2007-12-30 04:16
    so i can plug this little bad boy into my bs2 and turn one pin into 8? given i only want to use it for led's on and off?

    any experience with the ti 74ALS164A?

    http://www.alldatasheet.com/datasheet-pdf/pdf/28280/TI/SN74ALS164AD.html
  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2007-12-30 04:19
    Hi Rob, say you have 4 buttons in a PC application that control Stamp outputs, you would assign each button a value that represented the values of a 4 bit binary number, 1-2-4-8. As each button is pressed that value is added to a variable lets say "Switch_value". So if you press button one followed by button·three then the sum contained in Switch_value would be 5 or as a binary number %0101 (buttons one and three pressed).

    At the Stamp end of things your serin would recieve the value 5 in a variable say "sData", if your outputs were P0 P1 P2 and P3 then to activate the outputs you would do OUTA=sData which would set P0 and P2 high and P1 and P3 low.

    Back at the PC if you pressed button 1 a second time it would subtract the value 1, 5-1=4 or binary %0100, send that information down the line and you set P2 high and P0 P1 and P3 low. etc etc.

    Jeff T.
  • Rob311Rob311 Posts: 83
    edited 2007-12-30 04:53
    heh...
    experiment #23 and #24 on the stamp works text version 2.1 ... look at that...

    thanks guys!

    http://www.parallax.com/Portals/0/Downloads/docs/books/sw/Web-SW-v2.1.pdf
  • willy1067willy1067 Posts: 107
    edited 2008-01-03 17:13
    I'm controlling 48 LED's and they control 40 solenoids or motors.

    http://forums.parallax.com/showthread.php?p=641605
Sign In or Register to comment.