Shop OBEX P1 Docs P2 Docs Learn Events
74hc165 ic — Parallax Forums

74hc165 ic

MitchMitch Posts: 16
edited 2007-06-12 02:21 in BASIC Stamp
I have used the 74HC595 Shift-in Register to communicate with a 7 Segment LED, it works great and saves a bunch of pins. Now I want to go the other way (so it would seem).

I want to have a bank of 8 dip switches to provide configuration info to a BS2. I want the first 4 switches to indicate how many displays a central controller oversees (0000 thru 1111). The second set of 4 switches would indicate how many of those 15 displays should respond to input from the PIR Motion Detector.

My thoughts are to look at the 74HC165 IC. If I could convert the on/off settings of each switch to a bit in an 8-bit binary number I could send it to the BS2 using fewer I/O pins on the BS2. By shifting the 8-bit number then anding with a bit mask I could decipher the switch settings and save I/O pins.

First, am I on the right track and second is the 74HC165 the correct "tool" for the job? I must confess I have not gotten around to doing the related experiments in my Stamp Works kit.

Thanks,
Mitch

Post Edited By Moderator (Chris Savage (Parallax)) : 6/11/2007 3:56:47 AM GMT

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-06-11 04:05
    Mitch,

    The 74HC165would definitely do as you need. I have used it for this purpose myself. Simply shifting the data into a byte variable which has aliases for the individual bits serves as status flags. The Stamp Works Manual is exactly what I would recommend for helping you understand the connections and code. It’s actually pretty straight forward. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • MitchMitch Posts: 16
    edited 2007-06-12 02:21
    Chris:

    I curled up with the Stamp Works book. I was embarrassed to see that the exercise was EXACTLY what I wanted to do...

    Thanks for your reply!

    Mitch
Sign In or Register to comment.