electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

Using PIC for 433MHz RF Link


Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> Using PIC for 433MHz RF Link
Author Message
gidp



Joined: 20 May 2009
Posts: 7


Post07 Sep 2009 21:08   

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
Back to top
elrayes



Joined: 03 Jun 2008
Posts: 164
Helped: 8
Location: Egypt


Post13 Sep 2009 15:43   

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.
Back to top
Google
AdSense
Google Adsense




Post13 Sep 2009 15:43   

Ads




Back to top
gidp



Joined: 20 May 2009
Posts: 7


Post13 Sep 2009 18:55   

pic using 433mhz


Thanks, I will check this grounding noise issue.
Back to top
FvM



Joined: 22 Jan 2008
Posts: 5154
Helped: 766
Location: Bochum, Germany


Post13 Sep 2009 20:30   

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.
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> Using PIC for 433MHz RF Link
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
433MHz RF link for under $10 BOM? (6)
Basics of Point-to-Multipoint 433MHz wireless link? (2)
Wireless data link problem (433MHz, ASK modulation) (6)
Help for PIC to PC RF Link (13)
code examples for pic using PIC C (2)
Rubber antennas for 433MHz aplications (1)
Link for Oscilloscope using an AVR microcontroller and a TV (3)
Looking for 433MHz 76.8kbps OOK transceiver (2)
Looking for the cheapest method to commincate in 433MHz (21)
Using PIC MC for ISC (2)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS