View previous topic :: View next topic |
Author |
Message |
Guest
|
RF programming with 16F877A |
Posted: Sun Apr 26, 2009 1:10 am |
|
|
Hi all. I am now trying to setup a system of communicating between two RF (RFM12B), while the problems keeps coming. So anyone have any idea on how to test the RF since I don't know if the problem is due to my software or the hardware. Appreciate if anyone upload the testing program for the RF.
And my project is that the transmitter send a number and display it on the LCD in the receiver side. Thanks in advance for all your help. |
|
![](templates/subSilver/images/spacer.gif) |
Guest
|
|
Posted: Sun Apr 26, 2009 6:47 am |
|
|
Hi,
The "standard" technique is to hard-wire the two units together until you are absolutely sure that your software is working correctly. Only at that point do you break that connection, and introduce the wireless components. Without this strategy, you can chase your tail for days.
Be sure to observe any required polarity, signal level, etc. differences between the two configurations. Fully understand both before you proceed!
Chuck |
|
![](templates/subSilver/images/spacer.gif) |
bungee-
Joined: 27 Jun 2007 Posts: 206
|
|
Posted: Sun Apr 26, 2009 7:06 am |
|
|
RFM12B can-not be tested as described above, because you need to communicate with the modules first (SPI).
First thing that you can do is to connect RFM12B to PIC then connect PIC trough RS232 to PC. Write program that will just relay commands from RS232 to the module and from the module to the RS232. Then try to interactive commnicate with this module. If this work take the other pair (PIC + module) and connect it to second PC (or secon port of the same pc) and see what happens. ![Wink](images/smiles/icon_wink.gif) |
|
![](templates/subSilver/images/spacer.gif) |
Guest
|
|
Posted: Sun Apr 26, 2009 7:21 am |
|
|
Hi,
Well, you really missed the point!
The basic premise of my post still stands - take the RF out of the equation - and work on the problem in separate pieces. In some cases that means a direct PIC-to-PIC connection when you are using straight RF devices (like the LINX modules), or using a direct PIC-to-PC approach when using digital RF modules like the one above, or the XBEE, etc.
Chuck |
|
![](templates/subSilver/images/spacer.gif) |
Guest
|
|
Posted: Mon Apr 27, 2009 3:25 am |
|
|
thanks all of you guys. i have tried my software today. and i think they should be correct. and now i suspect the problem dues to the hardware connection.
so bungee-, do i must use port C of the PIC to connect pins SDI SDO and SCK of the RF. or i can use port B as well. and one more sad thing is i dont have RS232. have any other way to test the hardware?
appreciate for all of you and hope to hear you soon. |
|
![](templates/subSilver/images/spacer.gif) |
bungee-
Joined: 27 Jun 2007 Posts: 206
|
|
Posted: Mon Apr 27, 2009 5:35 am |
|
|
There is not a must in ports, but if your uC have hardware SPI better to use that one or you have to write your software SPI protocol.
Regarding rs232 - I have PICkit2 that have capability of UART tool. Anyway you need some means of communicating interactive to the module to figure out what is your problem.
@Chuck - your point is ok. Because we are dealing with smart modules, the communication between PIC and a module have to be established first. |
|
![](templates/subSilver/images/spacer.gif) |
Guest
|
|
Posted: Tue Apr 28, 2009 6:40 am |
|
|
thanks bungee. i will try to sovle it, appreciate for your hints |
|
![](templates/subSilver/images/spacer.gif) |
|