X-10


Closed Thread
Results 1 to 7 of 7

Thread: X-10

Hybrid View

  1. #1
    Join Date
    Feb 2006
    Posts
    89

    Default X-10

    Does anyone know how to properly connect the PL-513 to a pic. The PBP manual says 4 connections are required but only 2 pins are used which I assume are zero crossing output wire 1 and x-10 transmit input wire 4. I have tried hooking a 4.7k resistor to 5 volts on all wires, and it didn't work. thanks for all the support. Hopefully I will be able to provide it at some time in the distant future.

  2. #2
    Join Date
    Jun 2005
    Location
    Up the bush, Western Plains, NSW Au
    Posts
    216


    Did you find this post helpful? Yes | No

    Default

    You only really need 3 wires. 0v, ZeroCrossing & Data.
    The diagram in the manual is correct. Just make sure if you are using a ready made 4 core phone lead that has 2 RJ12 plugs, that the wiring is " Straight Thru'". You can confirm this by holding both flugs side by side, both the same way up and look at the colour of the wires from left to right. They should be in the same order.
    Oh yeah, you should also have a 4k7 or 10k pull-up on the zero crossing pin on the PIC.
    Last edited by muddy0409; - 11th March 2006 at 11:18.

  3. #3
    Join Date
    Feb 2006
    Posts
    89


    Did you find this post helpful? Yes | No

    Default x-10 Something is not right

    Alright. I swear I tried everything. Maybe I don't understand what you are saying to do. Here is my setup:

    PBP with melabs usb programer
    16f876a pic w/20 mhz resonator
    X-10 data pin is Portc.6 (yellow phone wire #4)
    Zero crosing pin output from pl513 to pin porta.3 (black phone wire #1) I also connect a 4.7k resistor from this pin to +5v
    wires 2 and 3 are tied to ground (this is the part I am not sure about)
    I have two buttons as an input to tell the pic to turn unit on and off.
    I have the X-10 plug set at D for the house code and 5 for the unit code.
    Here is the program used:

    include "MODEDEFS.BAS"
    define LCD_DREG PORTB
    DEFINE LCD_DBIT 0
    DEFINE LCD_BITS 8
    DEFINE LCD_RSREG PORTC
    DEFINE LCD_RSBIT 2
    DEFINE LCD_EREG PORTC
    DEFINE LCD_EBIT 1
    DEFINE LCD_lines 4
    DEFINE LCD_COMMANDUS 2000
    DEFINE LCD_DATAUS 50
    define OSC 20
    define PULSIN_MAX 500
    trisa = 0
    trisb = 0
    adcon1=7
    input portc.3
    input portC.4


    '--------------------------------------------
    CHNG VAR portc.3 ' Increment button
    SETIN VAR portC.4 ' Set button


    pause 2000
    LCDout $fe,1
    Main:
    if Chng = 0 then
    XOUT PORTc.6,PORTa.3,[5\5,5\uniton]
    LCDOUT $FE,1,$fe,$D4,"UNIT IS ON"
    endif
    if setin = 0 then
    xout portc.6,porta.3,[5\5,5\unitoff]
    LCDOUT $FE,1,$fe,$D4,"UNIT IS OFF"
    endif
    goto main
    end


    When I push either button, the little light on the pl513 goes out for a second or two and then comes back on. I am just not sure what else to try. Thanks for the help.

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    i can't really help 'cause i've never ever messed with any x-10 stuff but maybe the following Microchip's appnote may help

    http://ww1.microchip.com/downloads/e...tes/00236a.pdf
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  5. #5
    Join Date
    Jun 2005
    Location
    Up the bush, Western Plains, NSW Au
    Posts
    216


    Did you find this post helpful? Yes | No

    Default

    Hello again.
    It's a bit difficult for me to help ATM as all my gear and books are packed away ready to move house, so I gotta go by memory.
    The way I see it, if the red led is blinking on the transmitter module then it is seeing some data. So far so good.
    The trouble I had was making sure the house code was right. Codes A to P are equal to 0 to 15 and not 1 to 16 which was where I mucked myself up for a while. Your house code is "D" so that is equal to "3" and I think you are sending as "5". The easiest thing to check is to set the house code on the receiving module at A and send it something, without changing your program, and if nothing switches, set the module to B and go through the settings right thru to P and see if that makes a difference.
    I've just had a look at my program, but without the manual to look at I can't remember what the variables are or the correct setup of the X
    OUT command so that's not much help huh?
    Anyway, it seems to me that the transmitter is getting data from your PIC so I would make a little bet that the house code is part (if not all) of the problem. PS have you told your program that you are running at 20MHz? Try running at 4 and see what happens.
    I'm gunna be off the air for a couple of weeks at least, so I can only wish you all the best and I'll check the forum out as soon as I am back on.

    My send line is XOUT datapin,zeropin,[house\index\2,house\%11010] and yours is xout portc.6,porta.3,[5\5,5\unitoff] so muck around with the syntax of yours and compare them. (Mine does work perfectly BTW).

    [house\index\2,house\%11010] translates to [housecode\unitcode\2,housecode\unit off] from memory the 2, represents number of send each command, or similar.

    Anyway, all the best, and I'll catch up with you in a cuppla weeks or so.

  6. #6
    Join Date
    Feb 2006
    Posts
    89


    Did you find this post helpful? Yes | No

    Default Didn't work

    It didn't work. I have no idea what I am doing wrong. The led doesn't blink it only goes out and then comes back on.

Similar Threads

  1. How to drive the Vinculum VDIP1 in UART mode
    By BrianT in forum Code Examples
    Replies: 41
    Last Post: - 23rd May 2013, 12:34
  2. Data EEPROM gets clobbered during programming
    By BrianT in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 18th July 2008, 02:46
  3. USB-FTDI[UM232R] with PIC16f877a
    By bjox in forum USB
    Replies: 1
    Last Post: - 23rd February 2008, 22:40
  4. Serin serout problem
    By lerameur in forum mel PIC BASIC Pro
    Replies: 336
    Last Post: - 6th February 2007, 04:25
  5. Need help with 16f819 10 bit ADC
    By bannrikae in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 26th September 2005, 15:20

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