Control NEXA 230V RF Switch


Results 1 to 4 of 4

Threaded View

  1. #2


    Did you find this post helpful? Yes | No

    Default decode ?

    Hi all

    Could somebody please help the code on the receiver side , in other words to decode this ?
    the reaosn I am sasking is because I have the very same system at home and would like to add my little PIC project as a receiver to it.

    Here's what I thought would work so far ....

    Code:
    '****************************************************************
    
    DEFINE OSC 20
    
    T CON 350      ' T = 350uS
    T3 CON 1050    ' 3T
    T32 CON 11200  ' 32T (Stop/Synch)
    
    D_PACKET VAR WORD ' Holds 12-bit data packet to send
    INDEX VAR BYTE    ' Data packet bit index pointer
    LOOPS VAR BYTE    ' Loop counter
    
    RX VAR word   ' Connects to TX receiver data in
    RXPORT VAR portb.0
    RFCOUNT      VAR     byte[2] 'possibly be needing this 
    BITCOUNT var byte ' count number of bits received
    MARKER var byte 'check pauses or spaces of incoming pulse
    
    receive:
    LOW RX            ' RX output idles low for RF carrier OFF
    
    DEFINE PULSIN_MAX 11200				'>11200 RETURNS 0
    PulsIn RXPORT,1,RX 'receive pulse on portb.0 and hold in RX
    If (RX<11200) Then receive 'pulse is too short or > pulsin max try again
    While RXPORT=0:Wend			'wait pulse
    And that's where I'm stuck :-(
    What is the next thing to look for ? T or T3 and how would the code look ?
    Do I use a WHILE loop ?
    Should I be adding a REPEAT UNTIL ?
    I imagine a counter condition needed as well until we reach 12 bits
    Should I even be using pulsin or not ?


    Any help would be greatly appreciated.

    Kind regards

    Dennis
    Last edited by Dennis; - 5th December 2009 at 22:45.

Similar Threads

  1. Simple RF remote control code
    By Bruce in forum Code Examples
    Replies: 13
    Last Post: - 22nd January 2014, 11:45
  2. Need help - Just want to make a simple switch using RF Modules
    By financecatalyst in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 25th October 2009, 11:38
  3. Using input from Switch to control a loop
    By MrRoboto in forum mel PIC BASIC
    Replies: 9
    Last Post: - 2nd February 2009, 06:02
  4. PIC to control NEXA remoteswitch
    By Fredrick in forum mel PIC BASIC Pro
    Replies: 21
    Last Post: - 8th January 2009, 12:29
  5. RF Remote control
    By eralp in forum General
    Replies: 3
    Last Post: - 11th January 2007, 00:15

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