Shop OBEX P1 Docs P2 Docs Learn Events
How do I put the propeller in high impedance mode? — Parallax Forums

How do I put the propeller in high impedance mode?

So, say I have a propeller driving a CPU like a 6502 or Z80 and I want to share an address and data bus with external SRAM.
If I then put the CPU's address/data bus in high impedance state so that I can read/write values to SRAM, how would I then set the propeller's pins to the same when I'm done?
Basically, so that the CPU doesn't have any bus contention with the propeller when the propeller isn't accessing the shared buses.  
I tried searching for this but could not find anything.
Thanks

Comments

  • MJBMJB Posts: 1,235
    1. you run both processors at 3.3V ?? / you use level shifters?

    2. usually setting the pins to input is what you need - then they are high impedance.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2015-07-24 14:34
    I tried searching for this but could not find anything.

    I think it's kinda like a course prerequisite as these are some of the most basic basics and if you have had any experience with micros you would know that an input is "high impedance", that is more correctly, it is not trying to drive anything connected to it. I/O stands for INPUT/OUTPUT meaning it's programmable much like a data bus can be an input or an output which is why the Prop I/O like any other micro's I/O has direction registers to set them so. In Spin it is simply a matter of setting DIRA to make them outputs but by default they are all inputs or "high impedance".

    BTW, as mentioned by MJB the Prop is 3.3V and you can't interface directly with 5V logic, you will need level shifters or at the very least series resistors in each line of which the latter will effectively be "not so low impedance" which might be an advantage if the 5V logic accepts 3.3V as logic high (not normally).

  • Thanks for the info guys.  Yeah, I am new to electrical engineering in general.  But that makes sense making the pins input so that they don't try and drive another circuit.
    The CPU will be 3.3v but I don't know about the SRAM just yet.  If it's 5v then I will probably use level shifters.
    Sorry for the dumb question, it's sometimes hard going from full time software guy to hardware guy.  :-)
    Thanks
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2015-07-24 15:04
    Sorry, it sounded like a dumb question from someone who already plays with hardware and has "grand plans" for it but I do understand where you are coming from. Sometimes it's the terminology that is used that can lead to confusion and "high impedance" isn't really what we try to do when we turn a port into an input as "not so low" impedance would be fine too at times. My advice is avoid mixing 5V and 3.3V for this design, keep it simple and choose parts that can operate at 3.3V as I am sure the SRAM does too.

  • Yeah I'm not even really sure what "high impedance" really means.  I thought that was the official name for putting a pin in "Z" state, etc.  Meaning electrically disconnected.
    Anyway, the goal of my question was that I know how to disconnect a 6502 from an SRAM chip but I wasn't sure how to do the same thing for the propeller when it was time for it to release control.
    It makes sense about putting it in input mode.  However, doesn't that still mean the SRAM would be sending data to both the propeller and the CPU in read mode?  Is that advisable or should I do something fancier like use some type of buffer?
  • kwinnkwinn Posts: 8,697
    edited 2015-07-24 19:49
    Yeah I'm not even really sure what "high impedance" really means.  I thought that was the official name for putting a pin in "Z" state, etc.  Meaning electrically disconnected.
    Anyway, the goal of my question was that I know how to disconnect a 6502 from an SRAM chip but I wasn't sure how to do the same thing for the propeller when it was time for it to release control.
    It makes sense about putting it in input mode.  However, doesn't that still mean the SRAM would be sending data to both the propeller and the CPU in read mode?  Is that advisable or should I do something fancier like use some type of buffer?

    No need to do anything fancier. The propeller ignores those pins unless one of the cogs actually executes an input from them and does something with it.

    PS, high impedance came from ttl logic that had 3 states (input, output, and Hi Z). The inputs on those chips drew more current than cmos so the inputs were disconnected from the bus in the Hi Z state to reduce the load on the bus. There are also ttl chips that had only output and Hi Z for the same reason.
  • Yeah I'm not even really sure what "high impedance" really means.  I thought that was the official name for putting a pin in "Z" state, etc.  Meaning electrically disconnected.
    Anyway, the goal of my question was that I know how to disconnect a 6502 from an SRAM chip but I wasn't sure how to do the same thing for the propeller when it was time for it to release control.
    It makes sense about putting it in input mode.  However, doesn't that still mean the SRAM would be sending data to both the propeller and the CPU in read mode?  Is that advisable or should I do something fancier like use some type of buffer?

    No need to do anything fancier. The propeller ignores those pins unless one of the cogs actually executes an input from them and does something with it.


    Ah, cool.  Thanks for the tip.
Sign In or Register to comment.