Shop OBEX P1 Docs P2 Docs Learn Events
** Question: Expand “18” Potentialmeter by using 74HC595 or 74HC165? ** — Parallax Forums

** Question: Expand “18” Potentialmeter by using 74HC595 or 74HC165? **

eflyefly Posts: 34
edited 2009-08-03 16:36 in BASIC Stamp
Hi all,
·
I have a control project which need to input total 18 numbers of potentialmeter at the same time, at first I am thinking using chips set (74HC595 & 74HC165) I/O expansion method. <Picture 01>
·
However, after I connected all circuit I really don’t have any idea since the general RCTime· Porgram at first set Pin 7 to high (as a output) then in RCTIME line command consider Pin 7 is input, how can I mix the (Pin7e-after expand, for example)·as 74HC595 is input and 74HC165 is output at the same time….?
·
Could some Parallax experts have any good idea?

Many thanks.·yeah.gif·

Efly

Post Edited (efly) : 6/28/2009 5:01:17 PM GMT

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-06-28 17:27
    I don't recommend reading potentiometers this way since it's very slow and will require a lot of parts. The 74HC595 and 74HC165 are very good solutions for digital inputs and outputs. I suggest you use some kind of multiple channel analog to digital converter like the ADC0838 (8-channel). Assuming your potentiometers are relative high value (4.7K to 10K), you just connect them across the +5V supply and connect the tap / slider to the ADC input. There's plenty of sample code showing how to use this device with a Stamp. You'd need 3 of them for up to 24 inputs. They're less than $3 each. You can use the same I/O pins for the clock and data lines and have one dedicated I/O pin for the select line for each device. That's only 5 I/O pins.

    Here's some info: psurobotics.org/wiki/index.php?title=ADC0838

    Do a web search for "ADC0838 Stamp" for other info

    Post Edited (Mike Green) : 6/28/2009 5:36:43 PM GMT
  • eflyefly Posts: 34
    edited 2009-06-28 17:48
    Dear Mike,

    Thanks for your valued advice, I will do some study on ADC and hopefully will suceed.· wink.gif

    Efly
  • eflyefly Posts: 34
    edited 2009-08-03 08:39
    Dear all,
    I found that it might help to using 8-Channel 12-Bit A/D Converter (MCP3208) in order to reduce the Basic Stamp input pin number for above project, however, does anyone have any sample circuit connection diagram between Basic Stamp 2 and·MCP3208 since I cannot find it on the parallax page as it only provide the datasheet detail.
    http://www.parallax.com/Store/Components/AllIntegratedCircuits/tabid/154/List/1/ProductID/573/Default.aspx?SortField=ProductName%2cProductName
    Many thanks.·· smile.gif
    Efly
  • dev/nulldev/null Posts: 381
    edited 2009-08-03 16:36
    You might consider TLC1543 10-bit ADC. 11 analog inputs.

    Sample code attached.
    The .VSD file is a Microsoft Visio file I made for the schematics, but the datasheet is pretty clear on this.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't worry. Be happy
Sign In or Register to comment.