Shop OBEX P1 Docs P2 Docs Learn Events
Rookie Questions — Parallax Forums

Rookie Questions

ajwardajward Posts: 1,130
edited 2011-06-22 16:31 in Propeller 1
Hey All...

I have a couple of questions...

I have a lot of mini-projects going on and yet another has come to mind.

Been assembling a second PEK on a large breadboard. I was wondering about connecting the two Propellers together. Read a lot about multiple props, but I'm not =real= clear on the process.

First... can I make the two Props perform identically by jumpering the 4 Prop plug pins to the second Propeller? Pointless exercise perhaps, but it's one of those "What would happen if I did this?" things.

Second, and I think it's possible, can you connect the two Props to function as a sorta, kinda P16X32A processor? No clue where to start with this, but I love to tinker.
My most used phrase when it comes to technology is... "What do you mean NO????" :smile:

Thanks for any advice.

Amanda

Comments

  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2011-06-20 09:41
    @Amanda,

    You can interconnect two propellers with as a TX/RX serial connection using two pins simply tied together.
    This will work for FullDuplexSerial. If you have the situation of two Protoboards non-USB. (The ones that require a propplug) then you could connect them together with a simple jumped cable between the plug ports. Providing that you don't have to program them while they are connected.

    If you get serious about higher speed connections between Propellers, then you can used a circuit like this one: A few resistors with pull downs to grounds to keep the pins from floating around.
    Server  ──┳─────22────────────22───────┳── Client
              | 330                     330 |
             |                             |   
                GND                        GND
    

    Dual Propeller experimentation is one that I've been very interested in myself.

    OBC
  • Mike GreenMike Green Posts: 23,101
    edited 2011-06-20 09:47
    Don't jumper the 4 PropPlug pins together. The Prop doesn't just receive from the PC. It transmits back as well. You may have the two Props sending different data back to the PC via I/O pins connected in parallel. That could damage one or both Props. It probably won't because the I/O pins are pretty robust, but there are no guarantees.

    You can't connect two Props to make a "sorta, kinda P16X32A", but you can connect them together so they talk to each other and you can write your programs to take advantage of that, but you gotta do most of the work. The only already-written stuff is some high speed inter-Prop communications (in the ObEx) that sends a message (some arbitrary bytes) from one Prop to the other.

    Connecting multiple Props together works pretty well when there doesn't have to be a lot of detailed information sent back and forth. For example, one Prop handles a VGA display and keyboard, maybe an SD card as well, acting as an I/O processor for a 2nd Prop that does mostly computation and handles a bunch of servos.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2011-06-20 10:02
    @Mike, Never had issues with Protoboard "NoUSB" connecting their Prop-plug pins. I'm not sure where the PC would interfere with that scenario as you would have to disconnect them before they could be plugged into a Propplug. Are you thinking long-term effects with the other two pins being interconnected here?

    OBC
  • RavenkallenRavenkallen Posts: 1,057
    edited 2011-06-20 10:13
    Or if you really needed speed, you could use a parallel I/O interface. A 8 bit data bus could boost speed considerably, but you would also use up a lot of I/O pins. As for connecting two props together to form a Super Prop, you can't do it directly but with some clever programming it is possible to get them to work in unison. Did you have an intended application?
  • ajwardajward Posts: 1,130
    edited 2011-06-20 10:16
    Mike Green wrote: »
    Don't jumper the 4 PropPlug pins together. The Prop doesn't just receive from the PC. It transmits back as well. You may have the two Props sending different data back to the PC via I/O pins connected in parallel. That could damage one or both Props. It probably won't because the I/O pins are pretty robust, but there are no guarantees.

    You can't connect two Props to make a "sorta, kinda P16X32A", but you can connect them together so they talk to each other and you can write your programs to take advantage of that, but you gotta do most of the work. The only already-written stuff is some high speed inter-Prop communications (in the ObEx) that sends a message (some arbitrary bytes) from one Prop to the other.

    Connecting multiple Props together works pretty well when there doesn't have to be a lot of detailed information sent back and forth. For example, one Prop handles a VGA display and keyboard, maybe an SD card as well, acting as an I/O processor for a 2nd Prop that does mostly computation and handles a bunch of servos.

    Thanks Mike! Of course it can't be a simple as I thought... or would like. ;-) The "P16X" is a nice thought tho'!!
    Much more research is needed!!!!

    Amanda
  • ajwardajward Posts: 1,130
    edited 2011-06-20 10:30
    @Ravenkallen - Ah... no serious project in mind. Just one of those learning tasks... "That would be cool. I wonder if it would work?"

    The folks at Parallax have so many neat toys, I just have a lot of things going on and... Oh, what's that shiny thing? ;-)

    Amanda
  • schillschill Posts: 741
    edited 2011-06-20 10:31
    ajward wrote: »
    First... can I make the two Props perform identically by jumpering the 4 Prop plug pins to the second Propeller? Pointless exercise perhaps, but it's one of those "What would happen if I did this?" things.
    Mike Green wrote: »
    Don't jumper the 4 PropPlug pins together. The Prop doesn't just receive from the PC. It transmits back as well. You may have the two Props sending different data back to the PC via I/O pins connected in parallel. That could damage one or both Props. It probably won't because the I/O pins are pretty robust, but there are no guarantees.
    @Mike, Never had issues with Protoboard "NoUSB" connecting their Prop-plug pins. I'm not sure where the PC would interfere with that scenario as you would have to disconnect them before they could be plugged into a Propplug. Are you thinking long-term effects with the other two pins being interconnected here?

    Jeff:

    I read the the quoted part of Amanda's post to be asking if you can program both of them at the same time by tying the pins on the two props together and connecting them both the the same prop plug. As Mike says, that does not sound like a good idea.
  • Mike GreenMike Green Posts: 23,101
    edited 2011-06-20 10:32
    OBC,
    I'm not concerned about the case where you have two Props intercommunicating using I/O pins 30 and 31. I'm concerned about trying to download the same program to two Props at the same time by jumpering the PropPlug pins together. The two Props will both attempt to respond to the PC's polling and they'll have slightly different timing, so they'll get out of sync and attempt to drive the I/O line in opposite directions theoretically damaging one or both Props. The attempt to download won't work for long because of the timing differences. The potential for damage can be avoided by putting series resistors between the two Prop's I/O pins, something like 220 Ohms would work fine, but not just jumpering them together.
  • ajwardajward Posts: 1,130
    edited 2011-06-20 10:35
    Mike Green wrote: »
    OBC,
    I'm not concerned about the case where you have two Props intercommunicating using I/O pins 30 and 31. I'm concerned about trying to download the same program to two Props at the same time by jumpering the PropPlug pins together. The two Props will both attempt to respond to the PC's polling and they'll have slightly different timing, so they'll get out of sync and attempt to drive the I/O line in opposite directions theoretically damaging one or both Props. The attempt to download won't work for long because of the timing differences. The potential for damage can be avoided by putting series resistors between the two Prop's I/O pins, something like 220 Ohms would work fine, but not just jumpering them together.

    More food for thought!

    @
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-06-20 11:32
    ajward wrote: »
    can you connect the two Props to function as a sorta, kinda P16X32A processor? No clue where to start with this, but I love to tinker.

    Hi Amanda

    If your definition of "sorta, kinda P16X32A processor" can be made to include:

    - two propchips
    - accesses to both props through a common interface
    - Prop1 cogs 0-7 on one area, and prop2 cogs 8-15 on another area, such that cogs0-7 don't expect direct access resources on Prop2 and vice versa,

    Then you can maybe do some of what you want, if you can deal with FORTH. If you love to tinker, then download the propforth 4.5
    http://propforth.googlecode.com/files/PropForth4.5-20110614.zip

    The code you want is at
    ..\Propforth4.5-20110614RC0\doc\tests\test-4.3.2 MCS+NoROM.txt
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2011-06-20 12:57
    @Mike & schill,

    Ah.. Yeah, I wouldn't try programming them at the same time either.. Just thought you might be onto something about the design of the Protoboard nonUSB that would cause issues interconnecting them together by the programming pins over the long term. I'm still learning this stuff too, so when I hear someone say "don't do that!" I like to get clarification as to "why" ---- Thanks!!

    OBC
  • ajwardajward Posts: 1,130
    edited 2011-06-20 20:42
    This is reason for asking about linking Propellers. I found there is never quite enough room on the PE Kit board for all the things I wanted to diddle with. So... I picked up an Elenco 9440 breadboard with gobs of room and moved the PE Kit onto it. With all that room, what was to first thing to add? Another Propeller of course!

    attachment.php?attachmentid=82357

    Most of the wiring is done. I'll put the power supply together tomorrow and check the re-assembly. My P2E Kit. ;-)

    Amanda
  • markaericmarkaeric Posts: 282
    edited 2011-06-21 01:11
    ajward wrote: »
    This is reason for asking about linking Propellers. I found there is never quite enough room on the PE Kit board for all the things I wanted to diddle with. So... I picked up an Elenco 9440 breadboard with gobs of room and moved the PE Kit onto it. With all that room, what was to first thing to add? Another Propeller of course!

    attachment.php?attachmentid=82357

    Most of the wiring is done. I'll put the power supply together tomorrow and check the re-assembly. My P2E Kit. ;-)

    Amanda


    I know you said you're not finished - but don't forget the jumper to ground for the Prop on the right :)
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-06-21 07:30
    Amanda,

    Someone on the forum has programmed multiple Props at the same time. I think it's in the Project forum now. Okay, I'll go find it. Here it is.

    There are lots of posts about Prop to Prop communication. It comes down to what you want to do and how fast you need it done.

    Duane
  • StefanL38StefanL38 Posts: 2,292
    edited 2011-06-21 10:26
    Do you really want to run the exact same program in both props?

    If yes how about a three-channel-switch. After booting the first propeller switching one EEPROM to the second prop and do a reset making the prop boot again. Now with connected EEPROM?

    If you want to run different code the 3-channel-switch could be used to switch connection to prop-EEPROM 1 and prop-EEPROM2

    As long as you do not use high frequency applications (more than 1MHz) you can simply use a flatcable to bring over prop-IO-pins to other bread-boards

    keep the questions coming
    best regards

    Stefan
  • ajwardajward Posts: 1,130
    edited 2011-06-21 13:24
    markaeric wrote: »
    I know you said you're not finished - but don't forget the jumper to ground for the Prop on the right :)

    Thanks for the comment!! Actually, the small jumper is in place... just covered by the red wire to RESn.

    @
  • ajwardajward Posts: 1,130
    edited 2011-06-21 13:32
    StefanL38 wrote: »
    Do you really want to run the exact same program in both props?

    If yes how about a three-channel-switch. After booting the first propeller switching one EEPROM to the second prop and do a reset making the prop boot again. Now with connected EEPROM?

    Stefan

    Stephan... Running the same code on both Props was just a "Gee, I wonder..." kind of question, but yeah... I'd kind of like to load both processors with one connection. Just as a learnng exercise.

    @
  • ajwardajward Posts: 1,130
    edited 2011-06-21 13:42
    Duane Degn wrote: »
    Amanda,

    Someone on the forum has programmed multiple Props at the same time. I think it's in the Project forum now. Okay, I'll go find it. Here it is.

    There are lots of posts about Prop to Prop communication. It comes down to what you want to do and how fast you need it done.

    Duane

    Duane,

    I ran across that thread last night during a restless bout. Looks interesting. I need to finish up the wiring and install the power supply. My goal? Nothing to advance the betterment of mankind. Just something to prove that I can make it work. Speed? Pshtt. Don't need speed, just functionality!

    Thanks,

    @
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2011-06-21 14:01
    You could install a simple terminal on the two. What is typed on one should show up on the other.

    http://forums.parallax.com/showthread.php?108928-CoggyTerm-2.0d-Terminal-w-VT100-emulation&highlight=PropCOMM

    OBC
  • GranzGranz Posts: 179
    edited 2011-06-21 19:35
    Amanda,

    Byte Magazine, October 1981, the Local Networks issue, on Page 50, has an article entitled "Ultra-Low-Cost Network for Personal Computers". The author proposes a simple network which runs over a standard RS-232 connection. In it's simplest configuration, he attaches a single diode (he uses a 1N4933) between RXD and TXD with the cathode pointing to the RXD pin and the RXD pin connected to the data line of a 2-wire twisted pair cable. The other wire in the cable is grounded. The data line is pulled down to -12VDC through a 2K resistor on each end of the cable.

    This network is designed for RS-232 voltage levels (+12 & -12), but it should be able to be reconfigured for TTL (change the pull-down voltage to 0 or change it to pull-ups to +5?). You could then dedicate one of the cogs to Network Control and it can then pass data between it's Prop and other Props on the network, handling things like addressing, broadcasts, collision handling, etc. I have been wanting to do some network experimentation with Props for a while, but am pretty busy at the moment.

    The article also includes upgrades to handle better speed, increase the number of nodes and other things like that. If you would like the article, PM me.
  • ajwardajward Posts: 1,130
    edited 2011-06-22 11:55
    Hey All...

    I finished up the dual Prop board this morning and both are running independently. The photo shows the finished (mostly) board and the Props running LED4OnOff.spin. (Hi-tech stuff there! :lol:)

    attachment.php?attachmentid=82401

    The biggest change I made from the PEK layout (Other than the Elenco Board) was moving and consolidating the power supplies. The new layout adds a 7812 regulator & cap. The power rail at the top provides unregulated voltage from the lab supply. The rails above and below the Props provide 3.3 vdc. The rails to the right can provide 5 & 12 vdc for other needs.

    I need to tweak the wiring for the 3.3 volt to clean up the look of the board. (Not needed really, it's just me!)

    Anyway... the thing works so it's time to start playing! Okay... playing =more=!

    Amanda
  • mindrobotsmindrobots Posts: 6,506
    edited 2011-06-22 12:20
    I love the BIG board! What a wonderful Propeller Playground!!

    Don't make it too neat or you won't want to tear it apart.....well, I guess it's OK for the power supply wiring! :lol:

    Rick
  • SapiehaSapieha Posts: 2,964
    edited 2011-06-22 12:31
    Hi Amanda.

    What I don't see is DECOUPLING capacitors on power rails to >Propellers (100nF) 2 on one Propeller (Both sides).
    Have it as practice That all IC's need that ones --- On every Power pair of its Power supply



    ajward wrote: »
    Hey All...

    I finished up the dual Prop board this morning and both are running independently. The photo shows the finished (mostly) board and the Props running LED4OnOff.spin. (Hi-tech stuff there! :lol:)

    attachment.php?attachmentid=82401

    The biggest change I made from the PEK layout (Other than the Elenco Board) was moving and consolidating the power supplies. The new layout adds a 7812 regulator & cap. The power rail at the top provides unregulated voltage from the lab supply. The rails above and below the Props provide 3.3 vdc. The rails to the right can provide 5 & 12 vdc for other needs.

    I need to tweak the wiring for the 3.3 volt to clean up the look of the board. (Not needed really, it's just me!)

    Anyway... the thing works so it's time to start playing! Okay... playing =more=!

    Amanda
  • ajwardajward Posts: 1,130
    edited 2011-06-22 16:05
    Hey Sapieha,
    Sapieha wrote: »
    Hi Amanda.

    What I don't see is DECOUPLING capacitors on power rails to >Propellers (100nF) 2 on one Propeller (Both sides).
    Have it as practice That all IC's need that ones --- On every Power pair of its Power supply

    Still getting back up to speed on my electronics knowledge. Decoupling caps...to keep transients from traveling along the power lines between IC's? My board has only one power rail supplying 3.3 vdc to the Prop chips. The second rail is provided power from the first through the wiring outlined in the PEK documentation (Something I want to change).
    Though I've experienced no issues with the layout, I've added a .01 uF ceramic across the 3.3 vdc supply lines.

    @
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-06-22 16:31
    The 0.1uF caps should be close to each Vdd pin of the Prop.

    Sapieha explains it well here.

    Duane
Sign In or Register to comment.