I am trying to construct a 2 way paging with PIC Basic and two types of microcontrollers PIC16LF84A and PIC16F88. I have two parts of my system, a sensor node and a transponder. The sensor node has a 434 MHz transmitter (TLP-434) and a 315 MHz (TLP-315) receiver(RLP-315). The transponder has a 315 MHz transmitter and 434 MHz receiver (RLP-434). My link from the sensor node to the transponder works properly. But my link from the transponder to the sensor node does not work properly. The problem now is my PIC to PIC communication works perfectly with a wire. But when I connected them to the TLP-315 and RLP-315 transmitter and receiver pairs it either does not work or works intermittently. I am doing serout only once this time with 4 $55 and 1 $aa in the preamble. I told the receiver to count for $55 four times. I am using a breadboards. On one breadboard I have a 315 MHz receiver and 434 MHz transmitter and the other breadboard I have a 315 MHz transmitter and 434 MHz receiver. I have been trying all different combinations for the past week but it seems like my 315 MHz receivers are not working like they should. I do not know what is wrong I am basically doing the same thing in both links but one link works while the other does not. Is this a PIC problem or a RF module problem.

Transmitter (on Sensor node)
'IEEE Encoding
'Transmitter Code
Include "Modedefs.bas"
trisb = 0
main:
u var byte : counter var byte : encode var byte : u = %1000
'u is the byte containing the input in binary, counter is a byte that describes the amount of bits to encode
'encode is the variable holding the encoded value
'Manchester encoding
For counter = 0 to 3
If u.0[counter]=0 Then
encode.0[counter*2]=0 : encode.0[counter*2+1]=1 'If it is a zero make the first bit 0 and second bit 1
Else
encode.0[counter*2]=1 : encode.0[counter*2+1]=0 'If not then make first bit 1 and second bit 0
EndIf
Next counter :
write 0, encode 'Write to EEPROM Location 0
High 1 'High on Port B Pin 1
Pause 1000 'Pause
Low 1 'Low on Port B Pin 1
serout PORTB.0, n2400, [ $55 , $55 ,$55, $55, $aa , encode ]: 'send out preamble and encoded from Port B Pin 0
goto main

Receiver (434 to 315) (on transponder)
Include "Modedefs.bas"

ct55 var byte: encoded1 var byte: s var byte: counter var byte: e var byte: action var byte:
encoded var byte: encoded2 var byte: action2 var byte: B0 var bit: B1 var bit: B0=1: B1=0
s=0: e=0: encoded1=0: counter = 0: action=0: action2=0: encoded=0: encoded2=0:

Main:

Clr:
s=0: e=0: encoded1=0: action=0: action2=0: encoded=0: encoded2=0

Maina:
ct55=0 'counter for $55 is zero

Wait55:
serin PORTB.0, n2400, encoded1
If encoded1 = $55 Then
ct55 = ct55 + 1
If ct55 = 4 Then goto Waitaa
Else
goto Maina
Endif
goto Wait55

Waitaa:
serin PORTB.0, n2400, encoded1
If encoded1 <> $aa Then goto Maina
serin PORTB.0, n2400, encoded1
write 0, encoded1

For counter = 0 to 3 : s.0[counter] = encoded1.0[counter*2]:Next counter
write 1,s

e = s:
If ((e.3=B0) and (e.2=B1)) Then
goto L3
Else
write 2, s
goto Clr
Endif

L3:
If((s.1=0) and (s.0=0)) Then
action=s:
action.1=1
write 3, action
High 6
Pause 1000
Low 6
For counter = 0 to 3
If action.0[counter]=0 Then
encoded.0[counter*2]=0 : encoded.0[counter*2+1]=1
Else
encoded.0[counter*2]=1 : encoded.0[counter*2+1]=0
Endif
Next counter:
write 8, encoded
Low 4
For counter = 0 to 4
Pause 400
High 4
Pause 400
Low 4
Next counter:
'For counter = 0 to 5
serout PORTB.2, n2400, [$55,$55,$55,$55,$aa, encoded]
goto Clr
'Next counter:

Endif

If ((s.1=0) and (s.0=1)) Then
action2 = s: action2.1 = 1:
write 4, action2
High 5
Pause 2000
Low 5
For counter = 0 to 3
If action2.0[counter]=0 Then
encoded2.0[counter*2] = 0: encoded2.0[counter*2+1] = 1
Else
encoded2.0[counter*2] = 1: encoded2.0[counter*2+1] = 0
Endif
Next counter:
write 9, encoded2
Low 4
For counter = 0 to 4
Pause 400
High 4
Pause 400
Low 4
Next counter
Low 1
For counter = 0 to 10
Pause 400
High 1
Pause 400
Low 1
Next counter:
'For counter = 0 to 5
serout PORTB.2, n2400, [$55,$55, $55, $55,$aa, encoded2]
goto Clr
'Next counter

Endif
End

Receiver code (315 Link), (on sensor node)
Include "Modedefs.bas"
ct55 var byte: encoded1 var byte: s var byte: counter var byte: e var byte:
s = 0: e = 0: encoded1 = 0: counter = 0:

Main:


Maina:
ct55=0 'counter for $55 is zero

Wait55:
serin PORTB.0, n2400, encoded1
If encoded1 = $55 Then ct55 = ct55 + 1
If ct55 = 4 Then
goto Waitaa
Else
goto Wait55
Endif
'goto Wait55

Waitaa:
serin PORTB.0, n2400, encoded1
If encoded1 <> $aa Then goto Maina
serin PORTB.0, n2400, encoded1
write 0, encoded1

For counter = 0 to 3 : s.0[counter] = encoded1.0[counter*2]: Next counter
write 1,s

If (s.1=1) Then
goto L4
Else
write 2,s
High 2
Pause 1000
Low 2
goto Maina
Endif

L4:
e = s
write 3, e
High 1
Pause 1000
Low 1
serout PORTB.3, n2400, [e]
goto Maina

End

Dani AI

Generated

— because the PIC-to-PIC link works on wire, this is almost certainly an RF/hardware issue rather than a PIC timing bug. Cheap 315/434 transmitter/receiver pairs are very forgiving for simple on/off keyfob use but brittle for framed serial: breadboard wiring, missing decoupling, poor antennas, and the receiver’s noisy analog output are the usual culprits. ’s suggestion to use an encoder/decoder is valid as a quick reliability fix for simple commands, but it trades away byte-level framing and error checking.

A focused checklist to improve reliability:

  • Fit proper antennas: quarter-wave lengths ≈ 23.8 cm for 315 MHz and ≈ 17.3 cm for 434 MHz. No antenna or a random long lead makes reception flaky.
  • Power decoupling: a 0.1 μF ceramic close to the module Vcc–Gnd and a 10–47 μF electrolytic nearby greatly reduce noise.
  • Avoid breadboards for RF. Move modules to a small soldered board or keep leads under 2–3 cm.
  • Clean the receiver output with a Schmitt trigger (74HC14) or a comparator if you see jitter; a pull‑up (e.g., 10k) can stabilise some RX boards.
  • Check polarity/inversion and signal amplitude with an oscilloscope or logic probe — RX outputs can be inverted or distorted by the receiver.
  • At the protocol level, lower data rate, lengthen the preamble/framing, add a checksum and acknowledgements and implement retries.

Simple diagnostic steps:

  1. Swap the two receiver modules and swap nodes to see if one particular 315Rx is bad.
  2. With modules close together (few cm), transmit a steady square wave into the TX data pin and observe the RX pin; that isolates RF from PIC code.
  3. Measure module Vcc under transmit; voltage dips point to supply problems.
  4. If you lack a scope, temporarily wire the RX output to an LED or another PIC input and monitor timing/consistency.
  5. If hardware fixes fail, consider higher-quality receiver modules (superheterodyne or built-in data-slicer) or a hardware encoder/decoder depending on the feature tradeoffs you accept.

If you want, provide which exact module part numbers and power wiring and I’ll point out the most likely fault lines.

Did anyone every find out anything on this topic?

I haven't gone tru your code yet but i am using those same modules... the thing is to use an encoder-decoder couple.... otherwise they work as you said, intermittently...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.