Shop OBEX P1 Docs P2 Docs Learn Events
How to RECIEVE signals from X10? — Parallax Forums

How to RECIEVE signals from X10?

GICU812GICU812 Posts: 289
edited 2008-10-19 12:35 in BASIC Stamp
There are dozens of examples on how to send X10 signals with a Stamp, does anyone know how to recieve them? I have a PSC05

Its 445 AM, Ive been working on this since like 10PM. I just dont see it happening with my abilities. I THINK there is a zero cross signal every ~8ms (which would coencide with 120hz, which is how many times a 60hz signal crosses 0 volts)
From what I've read, there is supposed to be a 1ms pulse at the start of each zero cross signal for "1", and the lack of a pulse for "0"

I just cant seem to nail it down.

Best Ive gotten was to take and drop in 32 bits right after I see something happen on the line, then debug out the bits

I can for the most part make that work, One byte is always the same for "on" or "off", and another byte always seems to refrence the unit number, but 6 and 8 look the same, and from what I know about the X10 code, 1 on and 1 off should be two completely diffrent bit sequences, not 1 be there, then on or off,

Anyway, what I can debug out of it, makes no sense to me, but I could just match the hex value against a table I make by seeing what comes out when I hit what button, but that seems very sloppy to me, and im sure there must be a better way.

I guess I will break out the oscope tomorrow if no one has any advice, but at this point, im ready to just say screw it and use someone else's previous suffering.

Comments

  • GICU812GICU812 Posts: 289
    edited 2008-10-19 04:52
    GAHAHHHHH!!!!

    This is truely maddening...

    Of course, I had to change it to run in a pollmode, so I can actually do something with the stamp, that changed the timing, now I have to find a way to tweak the timing so I can get repeatable output again..

    PLEASE?!?! anyone? any ideas?
  • GICU812GICU812 Posts: 289
    edited 2008-10-19 05:14
    Well, if you're not going to help, you'll have to listen to me talk out loud.
    I think what is going on is the PSC05 is sending 2 data packets


    Turn module 1 on
    1110-0110-01100
    1110-0110-00101
    Turn module 1 off
    1110-0110-01100
    1110-0110-00111

    1110 is the "start code"
    0110 is the house code A
    01100 is the code for unit 1
    00101 is the code for on
    00111 is the code for off

    Right now im getting (DEC) 62 , 56 for 1-on and (DEC) 62, 184 for off
    so that is (finally a good use for my CCNA)
    00111110 00111000 (one on)
    00111110 10111000 (one off)

    Cant say that really makes a lick of sense... I can accept im probably missing most of the preamble, and maybe even some of the house code, but the ends should line up.

    Post Edited (GICU812) : 10/19/2008 5:28:29 AM GMT
  • GICU812GICU812 Posts: 289
    edited 2008-10-19 05:23
    Splitting it up to make it easier to read.
    2 on 54, 56 and 2 off, 54,184
    Unit 3 is 46, same off and on codes

    Transmitted (according to documentation)
    Unit1 -01100
    Unit2 -11100
    Unit3 -00100

    Recieved
    Unit1 -00111110
    Unit2 -00110110
    Unit3 -00101110

    Doesnt make a lick of sense to me.

    Relevant links.
    http://www.x10pro.com/pro/pdf/technote.pdf
    http://media.wiley.com/product_data/excerpt/68/07645795/0764579568.pdf
  • GICU812GICU812 Posts: 289
    edited 2008-10-19 05:50
    Or.... I could just not be a moron, and order the CM11a, which uses standard serial protocol, and pulls a line high when it has data to transmit, so it takes care of the polling for me.

    So, I think I'll just order one of those. Wish I would have seen that BEFORE I spent 12 hours working with this. The PSC05 would probably work great for using the xout commands, but I dont see it working for input, unless you can figure out how to synch the input.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-10-19 06:17
    GICU812 -

    Your interpretation 2 messages back is right on the money, and in accordance with the X-10 codes list on Page 5 of the Technote PDF. What seems to be the problem?

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When all else fails, try inserting a new battery.
  • lenswerkslenswerks Posts: 40
    edited 2008-10-19 12:35
    Take a look at the Micromint serial PLIX chip. I've used the parallel PLIX many times in the past with Parallax Stamps·and now they·have·a serial version - 19$.

    Check it out - http://www.micromint.com/datasheets/serplix.pdf
Sign In or Register to comment.