Shop OBEX P1 Docs P2 Docs Learn Events
Parallax 433 MHz transmitter/reciver — Parallax Forums

Parallax 433 MHz transmitter/reciver

FredrickFredrick Posts: 13
edited 2008-02-17 20:27 in General Discussion
Hi

I tying to use Parallax 433 MHz transmitter/reciver whit PicBasic pro and 2 microcontrollers (Transmitter PIC16F628A ) (Reciver PIC16F872) the PBP langue is similar to the BASICStam´s.

I use this codes for the transmitter and reciver and it works well BUT there is a problem.. i drive the modules in True mode not in Inverted so i have a RF carrier when i´m not sending anything this is becous it don´t work with

SEROUT transmitterpin,[b]N2400[/b],[noparse][[/noparse]$55,$55,$55,63519,Counter,check]
and
SERIN reciverpin,[b]N2400[/b],500,NoSignal,[noparse][[/noparse]63519],counter,Check 




The reciver only recivs the data sometims in inverted mode, but in true mode it works well.

one solution is to connet the 5V pin on the RF modul direkt to a pin on the microcontroller and pull it high before i want to send somting and then pull it low again or use the PDN line. the current for the module is 5.2mA and i have 20mA on the I/O pin on the 16F628A so that will be enought.

But why does not the module work whit inverted mode?
has it something to do whit noise in the air or?

CMCON = 7 'Alla I/O Digitala
LEDPin var PORTB.0
TransmitterPIN var PORTB.4
include "modedefs.bas"
Check var byte
Counter var byte
clear

check = 254

Main:
   
    high ledpin
       
    SEROUT transmitterpin,T2400,[noparse][[/noparse]$55,$55,$55,63519,Counter,check]     
   
    low ledpin
    counter = counter + 1
    pause 500

goto main
end



ADCON1 = 7 ' Alla digitala
DEFINE OSC 20
DEFINE LCD_COMMANDUS 3000   'Set command delay time in us
DEFINE LCD_DATAUS 200       'Set data delay time in us
DEFINE DEBUG_BAUD 2400 
DEFINE DEBUG_MODE 0
DEFINE DEBUG_REG PORTC
DEFINE DEBUG_BIT 7   'PORTC.7 OLIMEX RS232Board
include "modedefs.bas"
ReciverPIN var PORTC.0
Check var byte
Counter VAR byte

clear
pause 500

Main:
    SERIN reciverpin,T2400,500,NoSignal,[noparse][[/noparse]63519],counter,Check  
    
    if check = 254 then 
        gosub lcd
    else
       gosub Nosignal
    endif
        
goto main

LCD:
    check = 0
    LCDOUT $FE,1  
    LCDOUT $FE,$80, #counter, " LCD"
    debug #counter, 13,10    
goto main

NoSignal:
    check = 0
    LCDOUT $FE,1  
    LCDOUT $FE,$80, "No signal!"
    debug "No signal!", 13,10
goto main
END

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-02-17 19:06
    Fredrick -

    It appears that you are sending three leading $55 (SYNC) characters in the SEROUT statement of the first program which is fine, but you are not accounting for them in the SERIN statement in the second program. That may be causing a problem.

    If the RF hardware setup ignores $55 characters, then there is no need to make this modification. If not, I suspect this may help in getting further along:

    SERIN reciverpin,T2400,500,NoSignal,[noparse][[/noparse]$55,$55,$55,63519],counter,Check

    The SERIN above should check for the three leading $55 characters, and WAIT at the SERIN until it receives them. Then it will continue on with the SERIN and fetch the other items in the SERIN data list.

    I don't know why N2400 doesn't work and T2400 does, but one way to have the carrier NOT appear is to use an IC Inverter at each end. This would mean the addition of one IC at each end. Functionally this would work, but I honestly don't know if it's appropriate for RF communication, as I've never had to use this technique. I'm sure there are others on this forum who will know if this is an appropriate modification. I'm primarily a software person, and generally leave the hardware to those more knowledgeable about such things.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Genius is one percent inspiration and ninety-nine percent perspiration."

    Thomas Alva Edison
  • FredrickFredrick Posts: 13
    edited 2008-02-17 19:31
    I have tryed whit three $55 in the serin to.

    But how do you think of the id
  • FredrickFredrick Posts: 13
    edited 2008-02-17 20:27
    To answer my self that does´t working becouse the transmitter module will take it´s power from the high data line insted and there is still an RF carrier in idle mode.

    Using the PDN pin shold work, but if i make the pin low and then high again when i want to transmitt i will send +5V into the PDN line whits is to mutch for LINX modul and i will damage it, whold a diode in serie to the PDN line avoid puting 5volts into it?
Sign In or Register to comment.