RF receiver with a transmitter on PIC (433Mhz)

I have a rf receiver RWS 371-6 and the transmitter for this component and i can`t receive. I tried with VirtualWire(outdated i think), Radiohead and RCSswitch libraries, and no one of them could work for me. i have used the examples of every library i couldn't make it work

i've been searching for a week or so and i could find anything so i'm doing my best to write this because i don't talk too much in english

with this code at least i can receive something(all of the inputs are 0 so i didn't work anyway)

#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();

void setup() {
Serial.begin(9600);
mySwitch.enableReceive(0); // Receiver on interrupt 0 => that is pin #2
}

void loop() {
Serial.print("Received ");
Serial.print( mySwitch.getReceivedValue() );
Serial.print(" / ");
Serial.print( mySwitch.getReceivedBitlength() );
Serial.print("bit ");
Serial.print("Protocol: ");
Serial.println( mySwitch.getReceivedProtocol() );
}

this is the transmitter code in PIC:

include "modedefs.bas"

inicio:
//main
botona var portb.0
botonb var portb.3
high portb.5
pause 1000

low portb.5
pause 1000

high portb.6
pause 1000

low portb.6
pause 1000

proceso:
//an artificial loop if you look at the others functions
if botona = 0 then goto aaa
if botonb = 0 then goto bbb
serout portb.2,n2400,[$FF,$FF,"OK","C"]
gosub led
goto proceso

aaa:
serout portb.2,n2400,[$FF,$FF,"OK","A"]
gosub led1
goto proceso

bbb:
serout portb.2,n2400,[$FF,$FF,"OK","B"]
gosub led2
goto proceso

edit: the processes led, led1 and led2, only turn some leds on and off

By the receiver data sheet, which Google found for me, the receiver baud rate is fixed at 4800. Your code for the PIC seems to be transmitting at 2400 baud. Is there a problem there?

Paul

Paul_KD7HB:
By the receiver data sheet, which Google found for me, the receiver baud rate is fixed at 4800. Your code for the PIC seems to be transmitting at 2400 baud. Is there a problem there?

Paul

i didn't notice that, but anyway, in the others libraries(Radiohead and virtualwire) you can configure it the baud rate of the transmitter and receiver and in the examples they are in 2000, and if i use the same transmitter and receiver with that library in that baud rate it would work? or why it`s configured like that without a commentary saying that i need to change the rate depending the drive?

anyway i would change that to see if it fixes

I am just relaying what I read. As to why things are, I have no clue. Does the software documentation include the use of that receiver?

Paul

i didn't have any software documentation, and the only documentation i found was the data sheet and another datasheet PDF where it say a example of receiver and transmitter in pic and arduino that i couldn't find right now

(after a long search)

now i see that in this PDF says that 2400 baud rate for x model so i think i could work changing the baud rate