Shop OBEX P1 Docs P2 Docs Learn Events
Anything more precise than InA? — Parallax Forums

Anything more precise than InA?

ThePwnStickThePwnStick Posts: 6
edited 2009-01-28 19:44 in Propeller 1
Hello.

Is there something more precise than InA[noparse]/noparse for voltage/current measurement?
The InA function is a boolean right?

Comments

  • SRLMSRLM Posts: 5,045
    edited 2009-01-25 23:45
    Take a look at the app note for counters. It talks about how to create an ADC.
  • virtuPICvirtuPIC Posts: 193
    edited 2009-01-28 18:40
    ...or use additional hardware. TI, AD, LTC offer numerous inexpensive products with different resolution at various speeds using different interfaces.

    However, there are two drawbacks: You have to choose one of many products even for given demands and it's an extra chip. You've got the choice: Increase precision by oversampling or by using additional hardware.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Airspace V - international hangar flying!
    www.airspace-v.com/ggadgets for tools & toys
  • Mike GreenMike Green Posts: 23,101
    edited 2009-01-28 19:44
    INA is a 32 bit register that always reflects the Boolean state of the 32 I/O pins. The notation with the square brackets lets you access individual bits in the register or adjacent groups of bits. The Propeller datasheet gives the approximate voltage threshold used to distinguish true from false. As SLRM mentioned, there's an application note (AN001) that describes how to use a pair of I/O pins to create an analog to digital converter using two resistors and two small capacitors and the note includes sample code.
Sign In or Register to comment.