Shop OBEX P1 Docs P2 Docs Learn Events
how do i send data through a one wire device? — Parallax Forums

how do i send data through a one wire device?

crimcrim Posts: 8
edited 2007-04-26 17:49 in BASIC Stamp
how do i send data through a one wire device? what command do i use or whats the program?

please help

[noparse][[/noparse]Subject edited]

Post Edited By Moderator (Chris Savage (Parallax)) : 4/25/2007 11:57:26 PM GMT

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-04-25 17:36
    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
  • metron9metron9 Posts: 1,100
    edited 2007-04-25 17:37
    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!
  • crimcrim Posts: 8
    edited 2007-04-25 17:38
    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.

    please help
  • crimcrim Posts: 8
    edited 2007-04-25 17:42
    i can use the BS2p and the OWOUT is blue now, what should i typ after the OWUOT command
  • Mike GreenMike Green Posts: 23,101
    edited 2007-04-25 18:22
    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?
  • crimcrim Posts: 8
    edited 2007-04-25 19:46
    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
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2007-04-25 20:06
    crim.

    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.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • KatyBriKatyBri Posts: 171
    edited 2007-04-25 21:13
    Crim,

    On the Rentron site's front page is a link to some examples. They include an example for the STAMP. It is attached.
  • crimcrim Posts: 8
    edited 2007-04-26 16:07
    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?
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2007-04-26 17:46
    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.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-04-26 17:49
    Some example code for this module was also posted for our Solder Pot Controller recently in the following thread.

    http://forums.parallax.com/showthread.php?p=637023

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
Sign In or Register to comment.