Shop OBEX P1 Docs P2 Docs Learn Events
Adc0834 — Parallax Forums

Adc0834

computer guycomputer guy Posts: 1,113
edited 2007-05-25 23:43 in Propeller 1
How would i wire an ADC0834 chip up to the propeller.

The ADC0831 uses 5v so i am assuming that the DO pin one it would need a resistor and the the DI might need a transistor to supply it with 5v.
Would this be right?

Thank you smile.gif

Post Edited (computer guy) : 5/24/2007 6:34:38 AM GMT

Comments

  • computer guycomputer guy Posts: 1,113
    edited 2007-05-24 06:30
    echo...echo

    Bump smile.gif
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2007-05-24 13:08
    It should just work with a resistor on both.

    3.3v will register as a high (datasheet states 2v is minimum for a logical high on input).

    Putting a resistor on DI is just a precaution

    Graham
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-05-24 15:43
    computer guy said...
    echo...echo

    Bump smile.gif
    Please just rephrase your question in the future.· 'bump' messages are non-productive and don't communicate any new information.· I usually delete them.· Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • computer guycomputer guy Posts: 1,113
    edited 2007-05-25 03:42
    So a 1k resistor on both pins?

    And sorry for the bump sometimes I get really impatiant when I need information fast.

    Thank you smile.gif
  • Mike GreenMike Green Posts: 23,101
    edited 2007-05-25 04:24
    Yes, anything from about 220 ohm to 4.7K should work. If you accidentally connect a Propeller pin to +5V through a resistor, you've got a little over 1V to absorb since the Propeller's protection diodes will conduct when the voltage exceeds 3.3V + 0.6V = 3.9V. You really want to limit the current to only a few milliamperes. With a 220 ohm resistor and a 1.1V drop, the current is about 5ma. With a 4.7K resistor, the current is about 250ua. Higher resistors will tend to slow down the switching speed (because of RC time delays), but the ADC0834 isn't a really fast device, so it probably doesn't matter here.
  • computer guycomputer guy Posts: 1,113
    edited 2007-05-25 23:19
    If I connect the ADC0834 up to 2 pot's on a joystick will it be fast enough to measure the position of the joystick as it is moved around.

    Thank you smile.gif
  • Mike GreenMike Green Posts: 23,101
    edited 2007-05-25 23:24
    The ADC0834 itself should be fast enough. You should be able to figure for yourself how many readings per second you will get. A Spin Serial I/O routine can easily do 19200 Baud and the SPI protocol that the ADC0834 uses isn't significantly more complicated, so you'll get at least 20K bits per second. Check out the ADC0834 datasheet to see how many bit times are involved in the reading of a single value. That times 4 will give you an idea of how many joystick readings you can get per second. You'll have to decide if that's fast enough for you.

    Post Edited (Mike Green) : 5/25/2007 11:33:15 PM GMT
  • computer guycomputer guy Posts: 1,113
    edited 2007-05-25 23:43
    Thank you assuming my calculations are correct I estimate it to be 7.8 times per second so technically 7 times per second.

    Conversion time for one pin = 32us.
    over 4 pins = 128us
    so therefore 1000 / 128 = 7.8125 times per second.
    That is great news to me! hop.gif

    Thank you smile.gif
Sign In or Register to comment.