HELP - HomeMade Remote Control - Why won't this code work
I put TX_TEST on one SX28 and Rx_TEST on another SX28
then connected the two RA.0's together.
I can't figure out why this code will just not work
When i push Button RA.1 or RA.2 the receiver blinks RB.4 (LED)
but nothing else seams to work.
Help
then connected the two RA.0's together.
I can't figure out why this code will just not work
When i push Button RA.1 or RA.2 the receiver blinks RB.4 (LED)
but nothing else seams to work.
Help
Comments
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
“The United States is a nation of laws -· poorly written and randomly enforced.” - Frank Zappa
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.hittconsulting.com
·
Do you have any recomendations?
On the receiver side you may want to allow for upper- and lowercase letters in your command header; here's how we do it at EFX-TEK with our serial accessories:
If you're expecting a character to be a letter then the function above can convert it to uppercase by using this call:
In my programs I use a constant called "Uppercase" so the listing is more readable:
If a non-letter character is received it is not changed by the function. Note, too, that the function above checks the baud rate jumper on our boards; you can remove this check for a fixed baud system.
Post Edited (JonnyMac) : 6/10/2007 6:54:19 PM GMT
I am ordering some 4Mhz's today.
Mark
I don't know if you looked at all your IR receiver modules, Digikey carries the Sharp line at low cost and high performance.
- Sparks
Could I need to do something with the Highbit and Lowbit? or with a sync pulse? (Please see attached code in previous post)
I can see that people have used·the RF·transmitter and·RF receiver·with the BS1, BS2 and then Javelin, but has anyone ever used them with the SX chips?
I have tested·the RF tranceiver package that I have and they work great with the CIP-8E and CIP-8D from·www.Rentron.com·but I can't get them to work with the SX.
Mark
P.S. I am now using·50MHz
Post Edited (jmevans) : 6/21/2007 5:06:32 PM GMT
I hope you will not mind my asking this but if the encoder chips work, why not use them instead of SX's?
It seems like you have only connection and signal generation issues to resolve. I was unable to open the documents that should describe these. If you can post that information or point to working code for another processor surely someone will help you figure out what settings you need and what sync pulses to send.
I am sorry I am not able to help further.
- Sparks
What transmitters/receivers are you using?
Dan
Post Edited (DosManDan) : 6/22/2007 7:59:07 AM GMT
I am trying to use a couple pair of these: http://www.sparkfun.com/commerce/product_info.php?products_id=7813#
I have used them with these : CIP-8E 8-Bit Encoder IC· and· CIP-8D 8-Bit Decoder IC from: http://www.rentron.com/remote_control/Holtek.htm
and they work great.
I have tried to transmit from one SX to another SX and a BS2 at the same time.· The DEBUG on the BS2 shows data, just not the data that i am trying to send. The SX shows data also but there again its not the data that I am trying to send.
Thanks
Mark
The two data lines you have are different, use the second data line and everything should be fine. So, from the outside edge of the board, connect to the second DATA pin, not the first one.
The reason it worked with the decoders is that they are able to use the digital signal. The second pin is analog, so you can just read it and not have to do anything weird. Interstingly enough, sometimes that second pin is called the TEST line, and the first one is called the DATA line.
I have diagrams, prototype boards·and complete code written for these, I just need to find time to draw up a schematic and post it. Maybe I'll get to it this weekend if I can find a moment.
Let me know how it works out for you,
Dan
Post Edited (DosManDan) : 6/22/2007 6:15:17 PM GMT
I will try that as soon as i get home tonight.· I would also be interested in your code and wireing diag. when you get them finished.
Thanks
Mark
I don't know how far you are looking to send a signal, but I've found these to be pretty effective in the 60-90 ft range. After that, stay signals start to mess things up. To get the full range, you need to invest a few dollars in an antenna made for the 433.92 frequency. There are two models I've looked at, one is about $3 and the other one is about $9. The cheap one looks like the metal antenna you would find on a radio, the other is a rubberized mini whip. If you are going for range, it think a small investment like this is worth it.
Dan
Are you using 12v on the transmitter?
Mark
Dan
I am getting my data through, but their is a problem, the first char. sent·is not always the first char. received.
do you have any code for something that you have working? Both TX and RX?
Mark
Post Edited (jmevans) : 6/23/2007 6:16:03 AM GMT
My SX-28 is hooked up to a keypad and an LCD screen. So depending on where you are looking at the code, you might want to remove some of the extra stuff. It should work fine as is, but you probably want to use debug statements where you see things that mention an LCD. This is literally straight off my drive, so you might also have to UNCOMMENT some lines, depending on what I was testing last. Basically make sure one chip is sending a message and the other is waiting to receive it. I don't remember what I was testing last, but this code works and was tested up to 60ft through walls in my house. I have about an 8" wire as an antenna. I can post a pic of my prototype if you think that might help.
My prototype has a Receiver AND a Transmitter on it. It talks to other boards that have the same configuration. I'll put the BS/2 code here too, since you mentioned needing that.
So, here is what the SX-28 files do:
Receiver - Reads the incoming data, displays it to an LCD panel, then sends an acknowledge "!"
Transmitter - Old code I used to send a test pattern. I included it in case you needed one.
RF Console - This is the one I use now for the prototype. The SX-28 scans a 3 x 4 keypad waiting for a·code. The code is packaged up with other info and transmitted. The program waits for a reply. The information is displayed on an LCD panel. This program works with the BS/2 transmit/receive code.
The BS/2 code waits for a message, checks it, then sends back a reply character.
I implemented a very crude checksum method, so you might need something a little more robust for your app.
I was going to post this as a finished project when I got it all cleaned up....so I hope people aren't to critical of it right now.
Dan
Post Edited (DosManDan) : 6/23/2007 8:43:20 AM GMT
Just checking up,
Dan
Thanks that did help. I am still experimenting with some timing issues, for some reason if I add a new debug on the BS2 it troughs off the first incoming char. again.·
But now I can get coding on the rest of my project.·
.
Mark
Have fun, best of luck with your project,
Dan