NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Basic Electronics » How do I interface a Parallel-In Serial Out Shift Register with my microcontroller?
May 31, 2011 by rboggs10 |
I want to hook up buttons to my shift register and have it send serial data to tell which button is pressed. How would I do this? |
---|---|
May 31, 2011 by rboggs10 |
Oh and by the way here is the datasheet for my Shift register: Datasheet |
May 31, 2011 by Rick_S |
Unless you wanted to constantly clock that chip an poll the serial data, there would be no real time way to check for button presses on an input. Now if the goal is to attach that to a dip switch array and read the position of those switches that could be done. Certain port expanders have an interrupt output that will signal a button press to prevent constant polling if you are looking for that. I guess what it boils down to is this.
I'm one of the most helpful guys here as most of my fellow Nerds will attest. However, I have enough on my plate with my own projects and such. I don't do peoples projects for them. If I had one of those with some spare time, I might play around with it if I knew exactly what you are trying to do. However by your post, the chip you are trying to use... Which I responded to in another thread... may not be the best for the application. Rick |
May 31, 2011 by rboggs10 |
By port expander is this what you mean?: Port Expander |
May 31, 2011 by Rick_S |
Somewhat like that one. The one you linked doesn't have an interrupt output to let the micro know it has a button pressed. I've used a 7318 in my I2C LCD project. I didn't use inputs on it though. The 7318 has the output. If you search the forum, there was someone else using a different expander with the intent of using inputs. I'm not sure where right now. I may check later and get back to you if you don't find it. Rick |
May 31, 2011 by rboggs10 |
Thanks, I will take a look at expanders and see what I can find. Expanders look more simple than shift registers. |
June 01, 2011 by Ralphxyz |
rboggs10, you might want to follow/participate in this thread with Inino. He is working on using switch input on a I2C port expander, he has the output working. Ralph |
June 01, 2011 by hevans (NerdKits Staff) |
Hi rboggs10, Just to throw another example out there we used the SPI bus to drive a shift register in our Xylophone project. That might give you some ideas. Humberto |
Please log in to post a reply.
Did you know that a square wave sounds different than a sine wave? Learn more...
|