Shop OBEX P1 Docs P2 Docs Learn Events
1 Wire on a PWR-I/O-DB and 2pe Motherboard? — Parallax Forums

1 Wire on a PWR-I/O-DB and 2pe Motherboard?

TB01TB01 Posts: 1
edited 2007-03-14 04:10 in BASIC Stamp
Can anyone tell me how to interface a 1 Wire network to the PWR-I/O-DB Daughterboards for the BASIC Stamp 2pe Motherboard?

It seems the OWOUT and OWIN ( usually used for 1 Wire comms) are used to communicate with the AVR chips on the motherboard and thus to the daughterboard I/O.

The Daughterboard docs says you can do it but doesn't say how.·

Any examples out there?

Thanks for any help


<!-- unit price -->

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-03-14 01:55
    Interfacing a One-Wire device or network to the PWR-I/O-DB is very straightforward and doesn't involve the AVR coprocessors:
    • It's easiest if you use pins P8 or P9 when the daughterboard is plugged into socket "A" (P0 or P1, when plugged into socket "B"), since these already have pullups.
    • You can also use A2 (P11 in socket "A"; P7 in "B") or A3 (P12 in socket "A"; P5 in "B"), but you'll have to provide 4.7K pullups, since the motherboard doesn't provide them for these lines.
    • A0 and A1 connect only to the AVR and would need AVR assistance for the one-wire protocol, which is not currently available.
    Here's a typical schematic for a One-Wire temperature sensor (DS1822) connected to P8 on the PWR-I/O-DB:

    attachment.php?attachmentid=45883

    Programs written to communicate with the sensor in this circuit would use OWOUT 8, ... and OWIN 8, ..., as described in the BASIC Stamp manual.

    -Phil
    227 x 180 - 1K
  • GilbertGilbert Posts: 1
    edited 2007-03-14 02:23
    ·I will like to have a picture of how to connect PIR sensor, LED, and·a buzzer·on the motherboard. And if possible the coded program·for my school project.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-03-14 04:10
    The PIR sensor will connect directly to the PWR-I/O-DB card using Parallax's "LCD" extension cables.

    LEDs can be connected there, too. If you control them through a BASIC Stamp pin, you don't even need a series resistor, since those are provided on the motherboard. Just connect between the port pin and ground (active high) or between the port pin and Vdd (active low). Important: The AVR outputs do not have series resistors. If you control an LED through a coprocessor, you'll want to add a 330-ohm series resistor.

    What kind of "buzzer" were you planning to use?

    As to the "coded program" for your school project, it's not the job of forum contributors to do your homework for you. You'll learn more by struggling through it on your own. We're here to help, of course, if you get stuck, but you've got to show some original effort.

    -Phil
Sign In or Register to comment.