Shop OBEX P1 Docs P2 Docs Learn Events
Help! Having difficulty measuring an analog input — Parallax Forums

Help! Having difficulty measuring an analog input

swannyswanny Posts: 1
edited 2009-02-15 05:58 in BASIC Stamp
This is my first Basic stamp project and I'm having some difficulties getting things to work right. I am using a Basic Stamp BS2pe (motherboard) with two daughterboards. Using the OW commands (as described in the documentation with the GP3 firmware) does not seem to work properly for measuring an analog input voltage. If anyone has some experience using this firmware and this hardware, I'd really appreciate any tips on how to troubleshoot.

Below summarizes the steps I've taken and where I'm at:

1) Installed .HEX firmware onto the motherboard coprocessor chips (and verified with the [noparse][[/noparse]$DD] command).

2) Configured my boards to use 5v Vdd and provide a analog signal 0 < v < 4.5v

3) Execute the following command:
Voltage VAR Word
Busy VAR Bit

OWOUT Owio, 0, [noparse][[/noparse]%00001011]
DO : OWIN Owio, 4, [noparse][[/noparse]Busy] : LOOP WHILE Busy
OWIN Owio, 0, [noparse][[/noparse]Voltage.HIGHGYTE, Voltage.LOWBYTE]

It seems to stall in the DO loop. I'm not sure why it's doing this or how to further troubleshoot. Aside from verifying the right instructions, pin assignments, etc., I've kind of run out of ideas. Any suggestions?

Comments

  • MikerocontrollerMikerocontroller Posts: 310
    edited 2009-02-15 05:58
    I think you need to specify a condition by relating the variable Busy to some value


    DO : OWIN Owio, 4, [noparse][[/noparse]Busy] : LOOP WHILE Busy (=,<,>,<>, ?????)
Sign In or Register to comment.