Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Using PIC for 433MHz RF Link

Status
Not open for further replies.

gidp

Newbie level 5
Newbie level 5
Joined
May 20, 2009
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,366
pic 433mhz

Hello,

I’m using the PIC 16F870 USART TX/RX for sending data over RF link at 433MHz.
The USART, works fine with baud rate of 4,800b/s (OSC=4MHz).
When I’m adding the RF link so the TX USART sends that data into the RF transmitter, and the data out of the RF receiver
Is feeding into the RX USART of the receiver PIC, most of the data that is received is corrupted, about 1/10 I get the right data.

I would like to know if anyone know how to operate this RF link using the USART, in a more robust way, so each byte that is transmitted
is also received properly. The USART TX and RX code is shown below.

Thanks in advanced,
Gideon.

TX_D
MOVLW 0x01 ; LOW byte TX
BTFSS PIR1,TXIF ; XMIT BUFFER EMPTY?
GOTO $-1 ; NO, WAIT
MOVWF TXREG ; YES, send data
CALL DELAY ; delay of 1ms

MOVLW 0x02 ; HIGH byte
BTFSS PIR1,TXIF ; XMIT BUFFER EMPTY?
GOTO $-1 ; NO, WAIT
MOVWF TXREG ; YES, send data
CALL DELAY_MS ; delay of 100ms


RX_D

; read the first byte
BTFSS PIR1,RCIF ; judge if RX buffer is full
GOTO $-1 ; if not, continue to check
MOVF RCREG,W ; if yes, move the receive data to W
MOVWF DATL ; save the first byte in DATL register
BCF RCSTA,CREN ; Clear receive enable bit, for resetting
BSF RCSTA,CREN ; Set receive enable bit

; read the second byte
BTFSS PIR1,RCIF ; judge if RX buffer is full
GOTO $-1 ; if not, continue to check
MOVF RCREG,W ; if yes, move the received data to W
MOVWF DATH ; save the second byte in DATH register

RETURN
 

sending byte from pic to rf transmitter

your problem may be in the interfacing between the PIC and RF front end, i think you need to make some isolation between them, may be ground noise.
remember that the PIC circuit is 20MHz maximum and the RF is at 344MHz which isn't a small number and sure will may have some interference issues and need good PCB handling for these frequencies.
 

pic using 433mhz

Thanks, I will check this grounding noise issue.
 

433mhz pic uart

I fear, you're using a RF transmitter/receiver pair, that isn't suited for transmission of UART data. Most simple ASK systems are intended for protocols with near 50% duty cycle, e.g. manchester encoded data or data from Holtek encoder chips.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top