Hi Tasmod,
I'm finishing a similar project to yours with LINX RF modules.
I choose the 433MHz version to ensure better distance; I tested with a "Splatch" (from LINX too) antenna and reached easely 70 meters. I paid $13.- for the receiver (RXM-433-LR) and $8.- for the transmitter (TXM-433-LR) module.
These RF modules are super-simple to use and it took me less than an hour from unpacking them to have sent the first data
I made this short (simplified testing) code fot the Transmitter:
Code:
' Fuses PIC12F675 - 4MHz XTal
@ __CONFIG _CPD_OFF &_BODEN_OFF &_MCLRE_OFF &_PWRTE_OFF &_WDT_OFF &_XT_OSC
' Registers 76543210
OPTION_REG = %10000000 'GPIO Pull-Ups disabled
INTCON = %00000000 'Set Interrupts
ANSEL = %00000000 'Select analog inputs
WPU = %00000000 'Weak pull-ups (check OPTION_REG)
GPIO = %00000001 'Set PORTS
TRISIO = %00000010 'Set I/Os
CMCON = %00000111 'Comparator Module settings
' Program
MAIN:
SEROUT2 GPIO.0, 813,["TEST",1] '1200bps
PAUSE 00
GOTO MAIN
END
...and the Receiver's code:
Code:
' Fuses PIC12F675 - 4MHz XTal
@ __CONFIG _CPD_OFF &_BODEN_OFF &_MCLRE_OFF &_PWRTE_OFF &_WDT_OFF &_XT_OSC
' Registers 76543210
OPTION_REG = %10000000 'GPIO Pull-Ups disabled
INTCON = %00000000 'Set Interrupts
ANSEL = %00000000 'Select analog inputs
WPU = %00000000 'Weak pull-ups (check OPTION_REG)
GPIO = %00000100 'Set PORTS
TRISIO = %00000000 'Set I/Os
CMCON = %00000111 'Comparator Module settings
' Variables
Led VAR BYTE
Led = 0
' Program
MAIN:
SERIN2 GPIO.2, 813,[WAIT("TEST"), DEC1 Led] '1200bps
GPIO.1 = Led
PAUSE 500
GOTO MAIN
END
Bookmarks