Shop OBEX P1 Docs P2 Docs Learn Events
XOUT with a X10 Firecracker — Parallax Forums

XOUT with a X10 Firecracker

GooberTekGooberTek Posts: 14
edited 2008-06-19 16:02 in BASIC Stamp
Can you use the X10 Firecracker with the simple XOUT command.· I understand the sample code for this. the Example written by somone named Al a few years back works great It's just I don't understand "how" it works.· There isn't much inline doco and I am not an expert in the X10 stuff.

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2008-06-18 20:05
    No.

    The XOUT command was designed for an entirely different X10 interface.

    The Firecracker CAN be used from the BS2 -- it will even support the 5-volt signalling levels of the BS2. But you'll have to 'toggle' two pins (plus a ground) in the right order to keep it powered and signaled at the same time.

    The way it works is: it's powered by the RTS and DTR signals -- basically just two pins.· You insure that at least one of the pins stays high at all times to signal it.· You toggle them low one at a time in a particular pattern to send a 'zero', or another pattern to send a 'one'.· The pattern is documented in X10 "Firecracker" documentation.

    Then, the Firecracker transmits using the X10 RF pattern to an X10 RF module, which sends the resulting 'command' onto the house's power-lines to be picked up by another X10 light or power control module.

    Post Edited (allanlane5) : 6/18/2008 8:10:28 PM GMT
  • GooberTekGooberTek Posts: 14
    edited 2008-06-18 20:55
    Thanks! I really appreciate the quick response. I somewhat understand what your talking about but not completely. I wish the program that was written by Al had a little more doco in it. I am just not that good yet. The unit that was written for the XOUT command; Was it wireless or wired?

    Do you know anyone who has documented the program a little tighter so I could walk thru it?

    Sorry to be a pain.

    Rob
  • allanlane5allanlane5 Posts: 3,815
    edited 2008-06-18 21:14
    Well, the Firecracker is also known as the "CM17". Here's an inexpensive kit: http://www.x10.com/automation/ck18a_s_ps32.html

    The XOUT works with the TW-523: http://www.x10.com/automation/x10_tw523.htm

    A really helpful X10 site: http://idobartana.com/hakb/index.htm

    BS2 code that uses the firecracker: Shoot, it was around here just recently, I thought...

    Edit: Aha!· It was on Al Williams website: www.al-williams.com/awce

    I'll attach the program, it's quite small.

    Post Edited (allanlane5) : 6/18/2008 9:30:09 PM GMT
  • GooberTekGooberTek Posts: 14
    edited 2008-06-19 02:24
    Thanks for the help.· I am trying to figure out what the code is doing.· What is the FOR·loop in this section of the code for?

    sendbyte:
    · DEBUG HEX byt," "
    · FOR i=0 TO 7
    ·· IF byt & $80 = $80 THEN xmit1
    ·· GOSUB send0
    nextbit:
    ·· PAUSE 1
    ·· byt=byt*2
    ·· NEXT
    ·· RETURN
  • allanlane5allanlane5 Posts: 3,815
    edited 2008-06-19 16:02
    Well, the Firecracker wants each "bit" sent to it separately. So the routine "Send0" sends a zero bit, while the "XMit1" sends a "one" bit.

    "SendByte:" above sends a BYTE to the Firecracker. To do that, it must 'break' the byte apart into bits.

    "IF Byt & $80 = $80 THEN XMit1" means -- if the most significant bit is one, then Transmit a one. "XMit1" comes back here with a "GOTO NextBit".
    "GOSUB Send0" means -- If the most significant bit WAS a zero, so we "fell through" to this piece of code, then Transmit a zero.

    "Byt = Byt * 2" means -- shift 'up' the byte being transmitted by one position. We now have a 'new' Most Significant Bit to send.
Sign In or Register to comment.