Serial Data interface
dodger
Posts: 37
Anyone know how to interface a serial data input to the propeller mc?
Thanks
Thanks
Comments
If you mean hardware, search the forum using the search link in my address below.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps (SixBladeProp)
· Prop Tools under Development or Completed (Index)
· Emulators (Micros eg Altair, and Terminals eg VT100) - index
· Search the Propeller forums (via Google)
My cruising website is: ·www.bluemagic.biz
Thanks,
Maybe you should digg a bit more first
or it may not even have a serial interface like Capt. Quirk said -·it might give you·perhaps·1 millivolt/Newton-Meter or something. In this case you need an ADC of some sort. Again, the datasheet will give you this information.
hope this helps!
Post Edited (InSilico) : 2/15/2009 10:30:25 AM GMT
hm - to say it positive - this is a really challenging situation.
OK my first approach would be to connect the sensor to an oscilloscope and watch the voltage level comimg out of the wires.
Therefrom you can get some basic information like voltage-level at all and pulse-length to get an idea what the baudrate might be.
Of course you can do some shots from the hip connecting the sensor to a RS232-interface
switching through all baudrates number of startbits, parity-modes, no of databits, no of stopbits, inverted mode on rx and/or tx
hardware-flow-control and softwareflow-control
As you can see from this parameterlist quite a lot of variations just for RS232
Then do the same with SPI and I2C
a complete different approach: try google picture-search to find a picture of the sensor
I think this sensor was NOT falling out of the sky. There must be some information about
where this sensor was used before or who worked with the same or similar sensors.
It is used in connection with some kind of object. What kind of object ? Maybe someone working with
this kind of objects knows more about this sensor
Another approach: what is the cost of another sensor that would do the same thing?
In relation to the COMPLETE project-budget ?
What only 0,5 percent ?
Plug this f... sensor into the .... of the man that told you to use this sensor and order the other sensor
with complete documentation !
best regards
Stefan
Can you crack open this watertight enclosure? Then you can take a look inside and find a part number. You can always get a new enclosure if you need it.
9600 baud, no parity, 8bit, 1 stop bit, no flow
There are 3 wires a tx, rcv, and gnd
I would like to interface it with the propeller mc
·
If the signal is 3.3V, you should be able to just connect tx/rx to any two pins on the Prop and tell the FullDuplexSerial object which pins.
If it's more than 3.3V (normal serial is 12V), you'll need a level shifter, like a MAX3232 to handle the voltage conversion between the two.· It's not difficult, and only needs a few extra parts.· You could go this route too:· http://www.parallax.com/tabid/254/Default.aspx· It's a few resistors, a cap, and three transistors.
Jason
Anyone know where to find more information on the full duplex object. I am trying to connect the serial torque sensor mentionioned above to the propeller. I just need to request the torque sensor to output its measurement. This is done by sending the ASC11 for D. Then I want to store the information on an SD card. I am having some trouble fine tuning the Fullduplex serial object. Any dummies guide to full dulplex serial out there.
thanks
After you have worked your way through the tutorials in the manual, you will be able to use all of the basic Propeller objects.
It will take far less time to do that than it has already taken you to run these posts in the forum.
I don't say this to be mean. It is something I had to tell myself at one point, and it has paid off.
Or, as the old saying goes... teach yourself to fish, and you won't have to wait for fish to be tossed onto a forum page. You may have heard it put differently...
Edit: Hardware often gets overlooked in favor of a software fix... 'cause it's easier to type software... Verify your basic hardware setup by reviewing "HOW TO SAFELY INTERFACE A 5V SIGNAL TO THE PROPELLER?", and "Computer guy's hardware guide for the beginner" in the Propeller Hardware Stickies on this forum.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"They may have computers, and other weapons of mass destruction." - Janet Reno
Post Edited (WNed) : 3/11/2009 3:59:20 PM GMT
CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
OBJ
SER : "FullDuplexSerial"
TV : "TV_Terminal"
Num : "Numbers"
PUB Main
Repeat 10
Num.init
TV. Start(12)
TV.str(string("trial"))
TV.out(13)
SER.start (17,16,3,9600)
SER.rxflush
SER.tx(68)
SER.rx
TV.str(Num.ToStr(SER.rx, Num#DEC))
TV.out(13)
TV.str(string("trial2"))
SER.tx(68)
Could anyone tell me where I am going wrong/
Thanks
Post Edited (dodger) : 3/12/2009 4:42:02 PM GMT
With a stamp, at least the minutia of the protocol is taken care of in a single command. You can do all sorts of serial protocols with a single line of code and be sure the stamp is kicking out the right signals.
This would at least allow you some certainty in putting the problem on the sensor side of the equation. The migration to the prop would not be quite as challenging once you have some predictability with the sensor and understand it's personality.
Jim-
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When your problem seems insurmountable, read the forum for a while.
Solve someone else's problems and yours won't seem so bad.