Shop OBEX P1 Docs P2 Docs Learn Events
Output of one pin feeding into input of another pin on same Prop - any need for — Parallax Forums

Output of one pin feeding into input of another pin on same Prop - any need for

ElectricAyeElectricAye Posts: 4,561
edited 2008-08-21 23:13 in Propeller 1
Hi,
I'm using one cog to output a signal on pin 15, which I want another cog to read on pin 20. This is my way of using the Propeller to test itself. Question is, do I need to put a resistor between the two pins to limit current? I don't think I do... but rather than unintentionally create a signal smoke generator out of my masterpiece, I thought I'd ask if there's some little known taboo about feeding one pin into another.

Thanks,
Mark

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
It might be the Information Age but the Eon of Ignorance has yet to end.

Comments

  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2008-08-21 19:28
    Why tie the output/input together at all? If one cog changes an output, the other cog can read the OUTA register for the status with no hardware needed at all.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.

    www.brilldea.com·- Prop Blade, LED Painter, RGB LEDs, uOLED-IOC, eProto fo SunSPOT, BitScope
    www.sxmicro.com - a blog·exploring the SX micro
    www.tdswieter.com
  • Mike GreenMike Green Posts: 23,101
    edited 2008-08-21 19:40
    It's not a taboo thing. It's a question of how much you trust your program to be correct. You're trying to avoid the situation where two connected I/O pins are both set to output mode and one is set to the opposite state of the other (accidentally of course). At that point, you have a short circuit between Vdd and Vss and that's a bad thing. Now the Propeller seems to be robustly built and Parallax has done some testing doing exactly what I've described and the Prop chip they used seemed to be be fine after doing this for some hours. That's a good sign, but they don't guarantee that there won't be some damage. What it tells you is that the Propeller can stand some abuse that most other microcontrollers cannot.

    You can either trust that the output circuitry on the Prop chip will limit the fault current to something that the Prop chip can sustain without damage or you can put in an external resistor that will limit the current or you can trust that you'll never make a mistake like this in your program.

    Post Edited (Mike Green) : 8/21/2008 7:45:59 PM GMT
  • ElectricAyeElectricAye Posts: 4,561
    edited 2008-08-21 20:12
    Sweiter,
    I guess I'm trying to simulate an incoming signal, so to my mechanically-oriented mind, reading a register... um... uh, is that the same thing as reading a square wave signal from the outside world? I just don't know.

    Mike,
    Okay, I see the danger now. Best to put in the resistors and play on the safe side.

    You guys are great. Thanks very much!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    It might be the Information Age but the Eon of Ignorance has yet to end.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-08-21 23:13
    It is still possible to use the same pin, your receiver that you are testing has the pin as input, and your simulated signal cog sets the same pin to output. The receiver will be reading the output of the simulated signal. But if you want to connect one pin to another (with or without a resistor) theres no harm in that.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
Sign In or Register to comment.