Shop OBEX P1 Docs P2 Docs Learn Events
Connecting 14 bit transducer — Parallax Forums

Connecting 14 bit transducer

JulianNottJulianNott Posts: 1
edited 2006-12-27 00:53 in BASIC Stamp
I have never used Parallax / BS before and would very much appreciae advice about connecting a transducer.

Is there any difficulty connectinga transducer with a 14 bit RS-232 serial output to a BS2 and controlling it with SERIN SEROUT or SHIFTIN SHIFTOUT?

The transducer I am thinking of using is on this page:

http://www.allsensors.com/products/products_industrial.htm

See 14 bit digital output at the bottom. I plan to use the barometer.

I am not clear if I should use synchronous or asynchronous control.

What I hope to achieve is a system that will accept a program via USB from a PC, [noparse][[/noparse]control if needed and] accept data from a transducer, carry out some simple instructions and close a relay if certain conditions are met.

So I'm open to any general advice.

This transducer is quite expensive, $150 or more I think. It would be equally possible to use a transducer and A/D converter. But I'm happy to spend money to save time.

Just about the only constraint is that I want to be able to use BASIC since this is the only language I know. If there is a seamless way to convert from BASIC between my keyboard and the processor that would be fine.

Any advice and suggestions very much appreciated.

Season's greetings:

-- Julian

Julian Nott www.NOTT.com

Comments

  • RickBRickB Posts: 395
    edited 2006-12-27 00:53
    In the sync mode, the transducer expects to be the master by clocking the data bits into the Basic Stamp (BS). While the BS expects to be the master by clocking the data bits in with its' clock, i.e. both want to be master. So you will have to use the async mode at 9600 or 19200 baud. Since the BS has ttl level (5 volts) serial i/o, you don't need to use level converters between it and the transducer. The data is in the form of 4 ascii characters making up a 4 digit hexidecimal number. You will need to convert that to the form that your program requires.

    Rick
Sign In or Register to comment.