Shop OBEX P1 Docs P2 Docs Learn Events
The Zen of the 1-Wire Protocol — Parallax Forums

The Zen of the 1-Wire Protocol

John CoutureJohn Couture Posts: 370
edited 2006-02-28 05:17 in General Discussion
The Zen of 1-Wire Protocol

Well, folks, I finally solved the riddle of how to program the SX and get them to communicate with the 1-Wire AAG Weather Station ... and I fit the program into a lowly SX18!

The 1-Wire protocol is basically a communication protocol to communicate with sensors and devices using only a single twisted pair of wires.· My weather station is over 400 feet from the shop and is working fine.
  1. Attached are two routines:
    1. AAG-Search-608.sxb - This program is used to determine the serial numbers of the AAG Weather Station
    2. AAG-Weather-845.sxb - This program is used to read the sensors on the AAG Weather Station.· You'll have to code your serial numbers into the program to get it to work with your instrument.
      ·
  2. A couple of notes about the programs:
    1. Although you can combine both programs into an SX48/52, I separated them so that they would fit in an SX18 / SX28.· I do have a version that is combined and working on an SX52 along with a 4-bit parallel LCD.· If there is any interest, I'll clean up the code and post it.
      ·
    2. As per Jon Williams suggestion, I use a serial port to display the output.· In my case I use an RS-485 network but by commenting out the Enable command you have a standard SerOut command that can be connected to a serial LCD.
      ·
  3. References:
    1. AAG· Weather Station - about $80
      http://www.aagelectronica.com/aag/index.html?target=p_1.html&lang=en-us
      ·
    2. Articles
    3. 1-Wire Protocol
    4. Open Source References



▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John J. Couture

San Diego Miramar College

Comments

  • BeanBean Posts: 8,129
    edited 2006-02-27 18:07
    John,
    Very nice code.
    A very cool application too.
    Thanks for posting it.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    "SX-Video OSD module" Now available from Parallax for only·$49.95
    http://www.parallax.com/detail.asp?product_id=30015

    Product web site: www.sxvm.com

    "Ability may get you to the top, but it takes character to keep you there."
    ·
  • John CoutureJohn Couture Posts: 370
    edited 2006-02-27 18:11
    Bean,

    You and Jon Williams are my inspiration. You two are the "zen masters" in my opinion. I'm just a lowly apprentice.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John J. Couture

    San Diego Miramar College
  • John CoutureJohn Couture Posts: 370
    edited 2006-02-28 01:03
    I just realized I referenced "Al Williams" in the source code and meant to reference Jon Williams. My apologies Jon!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John J. Couture

    San Diego Miramar College
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-02-28 05:17
    No problem -- I like Al too! (And no, we're not related)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
Sign In or Register to comment.