Shop OBEX P1 Docs P2 Docs Learn Events
Pin States — Parallax Forums

Pin States

NewzedNewzed Posts: 2,503
edited 2007-02-28 14:50 in Propeller 1
I have·my Prop piggyback·communicating.· On the Master, Pin 6 is SO, Pin 7 is SI.· On the slave Pin 6 is SI, Pin 7 is SO.· Is it necessary to declare pins as dira[noparse][[/noparse]pin] := 1 for SO and dira[noparse][[/noparse]pin] := 0, or is this done automatically by the program instructions?· Since connected pins are always SO/SI or SI/SO, and the default· state is input, is a current limiting resistor necessary?

When executing a serout/serin, what is the current between the two pins?

I am using Mike Green's simulation object and Martin Hebel's Extended_FDSerial object.· Both objects use the same declared Prop pin pairs, but only one object is used at a time.· Is this OK?

Thanks

Sid



▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Yesterday is history, tomorrow is a mystery, and today is a gift.

That is why they call it the present.

Don't have VGA?
Newzed@aol.com
·

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-02-28 14:50
    Is a current limiting resistor necessary?

    It depends on how much you trust your program to be correct. As long as it is impossible for two connected pins to both be in the output state with the output states opposite, then you don't need the resistors. If there's a bug in your programs and two connected pins both get set to output accidentally and the output states are opposite for more than a few microseconds, you might destroy the I/O pin circuitry.

    What's the current between an output pin and an input pin?

    An input pin has some capacitance that needs to be charged up and there's always a little bit of leakage (on the order of nanoamps to microamps). The charging current is usually brief (nanoseconds) and is affected by the resistance in the circuit. Since the output driver transistors are typically capable of 20-50ma of current, there might be a surge on that order lasting for a few nanoseconds. It all depends on the impedance in the connection between the pins. Steady state current is probably on the order of 1ua.

    Simulation object vs. FullDuplexSerial object's use of I/O pins?

    You'll have to look at the code. Most I/O routines set a pin direction in their start routines (either in the Spin or assembly initialization) and change it back to input in the stop routine, possibly by stopping the cog that is doing the actual work.
Sign In or Register to comment.