Can you easily make a way for two Propellers to comunicate?
Microcontrolled
Posts: 2,461
I am working on a project that includes three propeller chips and the connections go like this: Prop 1 is connected in a duel serial line with Prop2, and prop 2 loads programs into prop 3. If·Prop 2 has a collections of programs to be run by Prop 3 and prop 1 tells what to load, how would they communicate? (P.S. The serial comunication is through a phone jack with the probes on the Propeller straight through to the wires of the jack, and the cable ends at the "Hydra-Net" port on a Hydra, which has a filter and resistor on it. ) Also, I am using the Propeller Loader·Object for Prop 2 to Prop 3, and just the Phone line for connections between Prop1 and Prop 2. Here is a pictre of the custom Duel-Propeller PCB before the Phone jack was added. Neither of the connections work and that is the·problem. Please explain·simply what I should do because I have only been learning the Propeller for·4 months and I am only 14. Thank you for your patience.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Thank you for reading!·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Thank you for reading!·
Comments
If you have problems, just ask here - there are plenty of willing people on the forum only too happy to answer your questions
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Prop Tools under Development or Completed (Index)
· Emulators (Micros eg Altair, and Terminals eg VT100) - index
· Search the Propeller forums (via Google)
My cruising website is: ·www.bluemagic.biz
Your doing great! The info below should help you.
Click here for the complete info:
http://forums.parallax.com/showthread.php?p=691952
Have fun!
Bob
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Aka: CosmicBob
This project however was designed exactly for the purpose of high-speed data transfer from Propeller to Propeller ... because of this I did not conform to standard serial communication and decided to use features that were unique to the Propeller.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
Initially that's how I wrote the code, and then I moved it to two separate Propellers. I only tested it to 10 feet and the wire I used was purposefully poor quality so that it would fall in the worst extreme.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Would you please post the code? I think we understand it is experimental.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
JMH - Electronics: Engineer - Programming: Professional
My communication object is :
{{ Propeller communicate test }}
Obj
Ser : "Full_Duplex_Serial"
PUB Start
Ser.init (3, 4, 3, 19600)
Ser.tx (Bit1, 8)
if Ser.rx | Bit1
Ser.tx (Bit3, 8)
else
Ser.tx (Bit2, 8)
DAT
Bit1 byte %11111111 ' Return true
Bit2 byte %00000000 ' Return False
Bit3 byte %10101010 ' Confirm
will this work? Or will I have to store the value in a varible? If so, how do I do it? How do I read the data bit from the transfer?
I am not very experienced so please help!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Thank you for reading!·
···
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Prop Tools under Development or Completed (Index)
· Emulators (Micros eg Altair, and Terminals eg VT100) - index
· Search the Propeller forums (via Google)
My cruising website is: ·www.bluemagic.biz
Did you use an external clock to synchronize the two props?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
JMH - Electronics: Engineer - Programming: Professional
My plan is to send a start bit, followed by x bits (say 64 bytes [noparse][[/noparse]or more]·of 8 bits = 512 bits) followed by stop. I know the counters (video) can clock the bits out, but I am unsure at what speed I can clock in using the counters and which mode - but this can wait for now.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Prop Tools under Development or Completed (Index)
· Emulators (Micros eg Altair, and Terminals eg VT100) - index
· Search the Propeller forums (via Google)
My cruising website is: ·www.bluemagic.biz
Post Edited (Cluso99) : 1/27/2009 5:15:50 AM GMT
The serial I/O drivers already take care of processing the 8-bit values passed to ser.tx to make them into a bitstream and they do the equivalent to take a bitstream and extract 8-bit values that are returned by calls to ser.rx.
The easiest way to understand what's going on is to look at the Simple_Serial object and particularly the rx and tx routines. Each routine is really only about 7 lines of Spin. Take some sample data (like the value %10101010) and run it through the transmit routine on paper. Take a piece of paper and make a column for each variable and a couple of columns for intermediate results. Each line on the paper is a statement of the program (or a convenient part of a statement). For example, if the statement is "i := i + 1", you might have the value 4 on the current line. Start a new line and, in the "i" column put 5, then go on to look at the next statement.
P.S. Does anyone know if theres going to be another Propeller Design Contest this year??
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Thank you for reading!·
···
The Full duplex codes run in their own cog, so they must be 'start'-ed, not 'init'-ed. As Mike pointed out, the source code is the best reference possible. (Use the Source Luke, Use the Source). The easiest way to check these codes out is to connect via the PropPlug to a PC running a terminal program, or PropTerm, etc. Then you can really see what is going across the wire. There are also multi-serial versions available in the ObEx that can reduce the cog count in busy systems.
Cheers!
Paul Rowntree
The first PUB routine there is "init". Another question: What is PropTerm???
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Thank you for reading!·
···
http://insonix.ch/propeller/prop_term.html
The download links are at the bottom of the web page.
Thank You for the help!
Help is still appreciated, however, thank you!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Thank you for reading!·
···