X10 commands and PBP


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    dhouston wrote: ..... Is that from Iriave? I have a TR-1A (IiRC)
    Dave,
    Yes, Iriave is the manufacturer, very likely TR-2A is the updated version of the TR-1A. The reed is anabled before X10 Tx and disable at the end. This works fine and I can Tx out all X10 codes. The problem is the X10 Rx which is reading the same value whatever X10 code you burst on the main. We have 50 Hz, (which should be better, since we have longer time for the burst, 10 millisec delay among zerocrossing while 60 hz has 8.33 millisecs).

    ardhuru wrote: .....The reason I asked was, the delays incorporated in PBP for X10 commands assume a 60 Hz system; if you are in a 50 Hz country, you might have to tweak some values in the XIN and XOUT routines in the .lib files, especially if your transmitter and receiver are not on the same phase.
    ardhuru, I don't think the main frequency matter, otherwhise I should not be able to burst out with the XOUT instruction.

    ardhuru wrote: ..... When I design around X10 (my hardware directly interfaces with the mains), I do use the XOUT, but for receiving I decode the incoming signal manually.
    if I read correctly your words, you did already experiment XIN without success, so you solved the problem decoding the X10 burst writing your own Rx routine. More explicitely "XIN instruction doesn't work" and forget about fixing PBP XIN instruction, write your own Rx routine.

    Sounds very wise and realistic.

    Thank you very much for your posting.

    Al.
    Last edited by aratti; - 15th November 2009 at 10:19.
    All progress began with an idea

  2. #2
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    After sleeping on it...

    The TR-1A may have been a prototype. It output the 120kHz bursts rather than the data envelope as the TR-2A does.

    50Hz should not be a problem for RX since you are only interested in the 120kHz burst that immediately follows ZC. But, I have never tried XIN so cannot offer anything meaningful.

    If this is a one-off project, I would suggest a different chip. The ZBasic ZX328n sells for $10 plus the cost of the interface board and parts kit (plus shipping from the USA) but it has built-in low level interrupt driven X10 routines operating in the background. It has a serial bootloader making it easier to develop your program.

    If it's a commercial project, I'd follow Anand's advice.

  3. #3
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by aratti View Post
    you did already experiment XIN without success, so you solved the problem decoding the X10 burst writing your own Rx routine.
    Without success, if I interfaced the circuit directly with the mains, *without* a TW523. Yes, I did manage to decode the signal with my own routine, rather than XIN.

    Quote Originally Posted by aratti View Post
    More explicitely "XIN instruction doesn't work" and forget about fixing PBP XIN instruction, write your own Rx routine.
    Not quite true; XIN does work, only when used with a TW523.

    http://www.x10.com/products/x10_tw523.htm

    Regards,

    Anand

  4. #4
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    There are some other reasons to write your own routines. The TW523 delays its output for 22 half-cycles of the powerline (so it can validate the commands) and it only outputs if the commands are valid. This saves you the trouble of checking the manchester coded commands but also means your processor is deaf to the powerline while the previously received command is being output. The 22 half-cycle periods of deafness mean you miss 2/3 of dim/bright commands and cannot receive X-10's extended commands. Most importantly, the TW523 cannot avoid collisions as it is not operating in real time - it can only detect them after the fact. The TW523 was designed about 30 years ago and uses outmoded technology.

    XIN assumes a TW523 so it does not handle extended codes.
    XIN may also be expecting a silence after 22 half-cycles and is being confused by the continued output from the TR-2A.

    The TR-2A operates in real time so you need not miss any powerline activity. You can avoid collisions but you will also need to check the manchester validity of received commands.

Similar Threads

  1. PBP Book
    By Bruce in forum Off Topic
    Replies: 83
    Last Post: - 4th October 2021, 13:55
  2. PBP Extensions, What are they?
    By PJALM in forum PBP Extensions
    Replies: 9
    Last Post: - 28th September 2021, 12:26
  3. Sending Commands from Visual Basic about IR to Pic
    By tne_de in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 29th April 2009, 07:09
  4. PBP - are DEFINE command(s) mandatory?
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 15th September 2006, 17:43
  5. WRITE not working
    By servo260 in forum mel PIC BASIC Pro
    Replies: 31
    Last Post: - 29th December 2004, 03:02

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts