How do I put the propeller in high impedance mode?
cbmeeks
Posts: 634
in Propeller 1
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
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
2. usually setting the pins to input is what you need - then they are high impedance.
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).
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
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?
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.
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.