Shop OBEX P1 Docs P2 Docs Learn Events
BS1 compatible Shift Register? — Parallax Forums

BS1 compatible Shift Register?

FalconFalcon Posts: 191
edited 2011-12-18 09:18 in BASIC Stamp
Hello,

I have a project that requires 16 bits of data to be sent over an RF link to a unit that will be battery powered. I plan to use the Parallax Li-oin Power Pack charger. I'm also using the Rentron 433 MHz modules at http://www.rentron.com/Stamp_RF.htm
The sender will be a BS2px. I plan to send two BYTES of data that will light 16 LEDs accordingly.
I wanted to use a BS1 on the receiving end and, until recently, planned to use two 74HC595 Shift Registers as seen in Stampworks v2.1 page 134. Then I discovered that the BS1 does not support the SHIFTOUT command.

Is there a workaround for the BS1 to "simulate" SHIFTOUT commands, or is there another Shift Register IC that is compatible with the BS1 and can be daisy-chained to handle two BYTES of data?

Thanks,

falcon

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-12-18 06:23
    Write a subroutine to present the Data and then take that the Clock pin HI then LO.
    Or are you asking how to "parse out" a byte as bits?
  • FalconFalcon Posts: 191
    edited 2011-12-18 08:13
    PJ,
    The reason I choose the BS1 is because I want minimal power consumption. Just now I looked at the Current Draw for BS1 vs. BS2 in the BSM and the difference is negligible. I suppose I can just as easily use a BS2 and use the SHIFTOUT. Power consumption wise, I guess the LEDs are going to be a much bigger issue as there will alway be at least 16 lit.

    I do not understand that first sentence. Can you expand on that(for future reference)?

    And the answer to the second is no. I learned that on this forum earlier this year.

    Interestingly, page 127 of the Basic Stamp Syntax and Reference Manual v 2.2 indicates that the SHIFTOUT and SHIFTIN commands do apply to the BS1, while pages 431 and 435 show not applicable.

    Thanks for your reply.

    falcon
  • PublisonPublison Posts: 12,366
    edited 2011-12-18 08:32
    If you do a Google search for "BS1 74HC595", it will bring up a lot of info. The Nuts N Volts article by Jon Williams will show you how to do it.


  • Mike GreenMike Green Posts: 23,101
    edited 2011-12-18 09:02
    SHIFTIN and SHIFTOUT do not exist on the BS1, but, as PJ mentioned, it's easy enough to do the equivalent with simpler statements as show in the Nuts and Volts Column.
  • PublisonPublison Posts: 12,366
    edited 2011-12-18 09:18
    Page 6 of this Nuts and Volts deals with a 74HC595 and a BS1
Sign In or Register to comment.