Hi,
I am working on a project. I have a problem. I must measure some RF signals with some pic's ports. I am using PULSIN command for this. But I cannot measure any signals. Some parts of my code is here;
*********************************
...
TRISA=%11000011
RFCOD VAR PORTA.0
temp var word
temp = 0
lcdout $fe, 1
lcdout "test"
pause 500
START:
if RFCOD = 1 then
pulsin RFCOD, 1, temp
GOSUB CODECONTROL
endif
goto START
CODECONTROL:
lcdout $fe, $c0, #temp
pause 500
resume
*********************************
I have a 433 mhz hybrid on my board and it is connected my Pic's PORTA.0 and I am using PIC 16F876A. When I push my transmitter's button I can receive the signal from my hybrid. Because I can see the signal with my scope. But my codes;
if RFCOD = 1 then
pulsin RFCOD, 1, temp
GOSUB CODECONTROL
endif
never works. I can see the signals on my scope but I the "IF statement" doesnt work. The variable of RFCOD is 0 (zero) everytime. So I cannot read the signals. If somebody has any ideas I am waiting for. What the problem can be?
Have a nice day.
Bookmarks