View Full Version : how do i send data through a one wire device?
how do i send data through a one wire device? what command do i use or whats the program?
Post Edited By Moderator (Chris Savage (Parallax)) : 4/25/2007 11:57:26 PM GMT
04-26-2007, 12:36 AM
If you have a BS2, BS2e, BS2sx, you can't do 1-wire directly. There are some 3rd party vendors that sell a serial to 1-wire adapter that you could use
If you have a BS2p/pe/px, you use the OWIN/OWOUT statements. Look at their description in the PBasic manual
04-26-2007, 12:37 AM
Well, at it's root, you send high and low signals (voltages) from a pin on the stamp to the pin on the one wire device.
What signals are sent depends on the device you want to communicate with.
What one wire device are you trying to communicate with?
Think Inside the box first and if that doesn't work..
Re-arrange what's inside the box then...
Think outside the BOX!
im trying to send data to a SLED-C4 sevensegmint display developet by Rentron electronics,· their display is a one wire serial device and every comand i try dosent work.
i can use the BS2p and the OWOUT is blue now, what should i typ after the OWUOT command
04-26-2007, 01:22 AM
Have you read the Rentron datasheet and other documentation for the SLED-C4? It should describe what information has to go back and forth between the 1-wire master (the Stamp) and the SLED-C4. The sections in the PBasic manual on the OWxxx statements should give some simple examples.
How about posting a diagram or description of how you've connected the two devices and the program code you're using?
iv read the manual and its very unspicific it tells you the pins to conect to but to acualy send data they did not include, the manual is also only four pages long
04-26-2007, 03:06 AM
I took a quick look at the Rentron site and downloaded the SLED-C4 datasheet It is 8 pages long, and I guess it may be my level of experience, but it is very specific about the interface and thorough about the commands. It is ascii serial, using one wire from the Stamp to transmit data to the SLED-C4. It does use one wire, but there is another completely different interface named, "ONEWIRE", which is a different thing and that is what threw us off the track.
Your code should use the SEROUT command avaialble on any Stamp, or even the DEBUG command, not the OWOUT command. The data sheet has several examples using BASIC Stamp code, and also there is on the web site a .zip file (which I have not looked at) which claims to have code for several different processors.
So, my suggestion is to look at the Rentron web site and dig in from there.
04-26-2007, 04:13 AM
On the Rentron site's front page is a link to some examples. They include an example for the STAMP. It is attached.
thank you for the help, just one more question, iv tried the example programs and when i tried to send them to the display it did'nt work. i tried useing the serout comand but when i tried the code i put in it i got an error. what should i tell it to do?
04-27-2007, 12:46 AM
The device has an option for baud rate of 9600 or 19200. That is selected by tying a pin high or low. Did you pay attention to that? Peruse all the stuff from the Rentron web site. It seems to be very well written, and try the snippets in the data sheet and also the code that Katy attached above.
04-27-2007, 12:49 AM
Some example code for this module was also posted for our Solder Pot Controller recently in the following thread.
Parallax Tech Support