Dave
I am busy implementing your code and all your suggestions.
What must the Comm. port settings be on the PC Side (see attachment)?
I'm using MS Terminal to monitor the incoming data on the PC.
Dave
I am busy implementing your code and all your suggestions.
What must the Comm. port settings be on the PC Side (see attachment)?
I'm using MS Terminal to monitor the incoming data on the PC.
9600 8N1 - See the Define statements in my example.
You will need to change DEBUG_REG and DEBUG_BIT to reflect the pin you use for output to the PC. I wrote this for a 12F629.Code:DEFINE DEBUG_REG GPIO DEFINE DEBUG_BIT 2 'GPIO.2 DEFINE DEBUG_MODE 1 'Inverted DEFINE DEBUG_BAUD 9600
Ok, so my settings is correct, but it does not work?
I will upload my new schematics and code.
Mayby I have missed something.
Dave
I have updated my Schematics and used your source code.
I have made a couple of mods on the code, but it does not seem to work, don't know if I have missed something.
I am using MS Terminal to view the incomming data on the PC. The data did only came through once and it was a couple of junk characters.
Thank you very much for all your help!!
In your schematic, change both 22K resistors to 1K. These merely limit the current to what is safe. 5V / 1000R = 0.005A (5mA). The 22K is needed only when the voltage is higher as with an input from a PC using RS232 voltage levels. Here, all the voltages are 5V max.
In the code, comment out IF (space<40) OR (space>175) THEN init.
In the code, modify DEBUG (RF[i] REV 8) to send either hex or decimal representations of the bytes. I'll let you consult the manual for details. My code sends the Ascii byte values which may not all be printable characters, especially in MS Terminal.
HEX 50 AF 42 DB
DEC 80, 175, 66, 189
ASC P, », B, ╜
The protocol is explained at http://davehouston.net/rf.htm
Last edited by dhouston; - 26th October 2007 at 16:20.
Dave
I have made all your suggested changes.
I don't receive anything on the PC side, but for a test I have moved the RS232 to the transmitter. (Disconnected the TXD Pin and put the RS232 in its place)
Then I receive the following characters.
ננננננננננננננננננננננננננננננננננננננננננננננננננ ננננננננננננננננננננננננננננננ
ננננננננננננננננננננננננננננננננננננננננננננננננננ ננ
I don't have your hardware so I cannot set this up here and test it. I don't have the time for that anyway. I can only tell you I've used the code many, many times with 12F629, 12F675 and 12F673 and ASK RF modules.
You will only see garbage when you connect the transmitter TXD pin to RS232 as it is sending NEC protocol not RS232 protocol.
However, if you go back to your original approach, using SerOut & SerIn, you can send RS232 from the transmitter which might serve as a sanity check.
Bookmarks