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

Shift Register Question

SpragmaticSpragmatic Posts: 59
edited 2008-08-24 02:03 in General Discussion
Wondering if anyone has an example code for adding a shift register to a project I'm building.· I'm using it to control some L.E.D.'s.·
I see there is an example code for the Basic Stamp in the StampWorks manual, but not sure if it's the same on the SX using SX/B?
Thanks!!· Greg

Comments

  • ZootZoot Posts: 2,227
    edited 2008-08-24 01:22
    It's not exactly the same, but so close that it still tastes like soda!

    Readup on PULSOUT (for your latch) and SHIFTOUT in the SX/B help. The hook up and use is essentially the same as the '595 examples and such for the Stamps.

    Note that the SX has one bonus -- you can up the clock rate on SHIFTIN/SHIFTOUT -- if you are sending lots of data to the shift registers you can make it blazingly fast compared to the (relatively) slow Stamp.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
  • SpragmaticSpragmatic Posts: 59
    edited 2008-08-24 01:39
    Thanks!!
  • JonnyMacJonnyMac Posts: 9,215
    edited 2008-08-24 02:03
    With SX/B's SHIFTIN and SHIFTOUT you have to preset the clock polarity, otherwise it's the same with the bonus -- as Zoot mentioned -- that you can speed up the clock rate. See attached.

    Post Edited (JonnyMac) : 8/24/2008 2:09:33 AM GMT
Sign In or Register to comment.