Getting 2 or more SX28 chips to talk to each other. Is this possible?
Basically what the title says. I am wanting to get 2 or more chips to send variables back an forth so they can process them according to how the code is written per chip. One of the biggest things I am wondering is can this be done without disrupting the program and causing a noticeable delay...maybe with using an Interrupt. If using an interrupt, can I run all the chips off the same frequency chip? My local radio shack has lots of frequency chips that I can choose from, but I have no idea which one to use. I have seen some that have 75.*** Mhz on them, can these be used?
I am still kind of new to this and have many more questions, but I want to try and learn as much as I can before I fry a bunch of chips or waste alot of money tinkering with them.
I am still kind of new to this and have many more questions, but I want to try and learn as much as I can before I fry a bunch of chips or waste alot of money tinkering with them.
Comments
The answer to your question is an emphatic yes, but depending on what you need to do, it might be fairly easy or very difficult.
In one project I have a few hundred talking to each other in short bursts at 10 MegaBits per second. In the end, there were a number of constraints, but a rather elegant and simple structure, yet difficult to comprehend. So my implementation is not for beginners, yet I started just like you, having a need and the desire to bash at it until I found a satisfactory answer. Took almost two years to learn enough to make it happen.
I sell this product commercially, so unfortunately I can't go into too much detail..... but yes, it CAN be done. And as is so often the case, once you have figured it out, it's relatively easy. I just becomes a standard building block.
Cheers,
Peter (pjv)
You might start by·reading NV 147 (Nuts and Volts column) listed in the above best of threads.· Jonny Mac describes how he networks many computers together using RS-485.· There are a number of threads with interupt driven VP's (Virtual Periferals) ·for serial data transmission. I have used one of them very successfully.
RS_Jim
SPI Slave code in SX/B ·Code from Bean for a BS2 to SX
Parrallel Comm··Parallel Sx to Sx coms with a Serial controler code from Jon Williams
commutation between 2 sx chips··ISR Serial driven code from Jon Williams
Also the LCD example in the SX/B IDE is an example of BS2 to SX communication, that could be modified for an SX. Best thing about the LCD code, is that it has a wiring diagram too.
There are more threads on the subject, under SX to SX communication and at sxlist.com·. SX list has a more complete listings of VP PDF's than the Parallax web site.
Post Edited (Capt. Quirk) : 9/26/2008 10:51:55 PM GMT
You can't find any serial LCDs? Can you tell me what kind of searching you did?
www.parallax.com/Store/Accessories/Displays/tabid/159/CategoryID/34/List/0/Level/a/ProductID/52/Default.aspx?SortField=ProductName%2cProductName
Your homework assignment is to explore Google.
Thanks,
PeterM
http://forums.parallax.com/showthread.php?p=744915
You can find a picture of the board here:
http://forums.parallax.com/showthread.php?p=746315
Dan
Variables that are the same on both chips :
Baud CON "N9600"
SYNC CON $80
Code on Chip 1 (Display SX)
On chip 2 (Data SX)
Both chips are running at the same frequency but are using 2 different crystals. One of the chips is on a radioshack project board and the other is on the SX-Tech board. There is a common ground between boards. I am using a 100ohm resistor to ground on the data out pin on SX # 2 (Data SX) and there is a 1K resistor between the RX pins on the SX's. The code I am using is from an old project I did awhile back for communicating from PC to SX. The project worked 100% [noparse]:)[/noparse] Hopefully I can catch on quick this time [noparse]:)[/noparse]
It does not have a predefined rate, the faster the sender and receiver the faster the communication. It doesn't need precise timing either, so the SX internal oscillator works fine.
It also doesn't matter if the communication is interrupted (with an interrupt) on either the sender or receiver.
It is basically two wires that are pulled-up with resistors (much like I2c). I call the wires "ONE" and "ZERO".
When one device wants to send data, it pulls one of the wires low depending on if it wants to send a 1 or a 0.
The receiver upon noticing that one of the wires is low, stores the bit, then lowers the other wire.
The sender upon seeing that the other wire has been pulled low, knows that the receiver got the bit, so it releases the wire that it pulled low initially.
The receiver upon seeing that the wire that was initially pulled low, is now high, it releases the wire that it pull low.
Now both wires are high again and the process is repeated.
It sounds complicated, but it's not as bad as it sounds.
Here is the original thead with the SX/B code http://forums.parallax.com/showthread.php?p=716658
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
·The next time you need a hero don't look up in the sky...Look in the mirror.
Post Edited (Bean (Hitt Consulting)) : 1/11/2009 2:10:27 AM GMT
For some reason, I cannot get a byte variable to send though [noparse]:([/noparse]
Example :
temp1 VAR Byte
....
RANDOM temp1
SEROUT RX, Baud, temp1
When it is send to the display chip, it comes out as 63 all the time. Any ideas on this?
For numbers greater than nine, you will need to convert them to binary-coded decimals and send each digit one at a time. You can also just send the numeric value that corresponds to an ASCII character:
en.wikipedia.org/wiki/ASCII#ASCII_printable_characters
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Paul