Electronics > Projects, Designs, and Technical Stuff

STM32 blinking 30 LED's!

<< < (4/6) > >>

langwadt:

--- Quote from: OM222O on September 02, 2019, 11:05:51 pm ---
--- Quote from: langwadt on September 02, 2019, 10:23:09 pm ---so it is tri-state but "quasi tri state logic device" sounds more fancy?

--- End quote ---

not quite!
To put it in very basic terms: High Z mode is basically like an open circuit (think of it as a switch that disconnects the pin from the circuit). In most micro controllers they don't implement a Tri-State buffer, rather an "Output Enable" for the output driver and leave the pin connected to the input like others mentioned:


--- Quote from: Renate on September 02, 2019, 09:33:50 pm ---The DDR registers are simply tri-state enables. They only affect the output enable. All port pins are always actively inputs.
From Atmega328P datasheet.

--- Quote ---Independent of the setting of Data Direction bit DDxn, the port pin can be read through the PINxn Register bit.
--- End quote ---

--- End quote ---

That means by de-activating the output enable, you're not driving the pin anymore, but it's also not in the high impedance mode (it's not actually disconnected), hence the name: "quasi tri-state"

You can read more here: https://en.wikipedia.org/wiki/Three-state_logic
There's just a subtle difference in terminology and low level technical details, but you can think of the two as functionally equal.

I have to apologize to the OP since this topic has gone off on a huge tangent, please focus on the main question that the OP asked. Thanks  ;D

--- End quote ---

a sketch on wikipedia, really? and how is an input not high impedance mode?

https://patents.google.com/patent/US3845328


Renate:
Yeah, @langwadt, it's just like Heisenberg's Uncertainty Principle.
An output can be a real three-state output, but once you look at it, it can only be a semi-pseudo-fake-three-state-impersonator output.
So, no peeking! :P

Dave:

--- Quote from: OM222O on September 02, 2019, 11:05:51 pm ---To put it in very basic terms: High Z mode is basically like an open circuit (think of it as a switch that disconnects the pin from the circuit). In most micro controllers they don't implement a Tri-State buffer, rather an "Output Enable" for the output driver and leave the pin connected to the input like others mentioned:
<...>
That means by de-activating the output enable, you're not driving the pin anymore, but it's also not in the high impedance mode (it's not actually disconnected), hence the name: "quasi tri-state"
--- End quote ---
Absolute nonsense.

Tri-state just means that both N and P channel transistors that are driving the pin are turned off. Not "tugging" on the pin in either direction, leaving the pin to go to any potential within the power rails.
No pin in any logic chip is EVER really disconnected the way you think they are. You need a physical relay to do that.

OM222O:

--- Quote from: Dave on September 03, 2019, 09:45:56 am ---Absolute nonsense.

Tri-state just means that both N and P channel transistors that are driving the pin are turned off. Not "tugging" on the pin in either direction, leaving the pin to go to any potential within the power rails.
No pin in any logic chip is EVER really disconnected the way you think they are. You need a physical relay to do that.

--- End quote ---

I didn't mean physically disconnected like relay?  ???
To just finish this argument, try this:
1) Set the pin mode to input
2) Write a logic high or low to the input
3) See how it "drives" the input pin with internal pullups
4) Realize a true tri-state buffer doesn't do that without additional circuitry

example code for arduino:

--- Code: ---pinMode(2,INPUT);
digitalWrite(2,HIGH):

--- End code ---
Or the alternative:

--- Code: ---pinMode(2,INPUT_PULLUP);

--- End code ---

that's just one of the side effects of simulating a tri-state buffer rather than having an actual one. also look up the equivalent circuits of any MCU and see how they work. none of them have a tri-state buffer inside them  :-+

P.S: I won't comment / correct any further arguments, since this thread has gone way off the rails already and nobody is trying to help OP, rather trying to prove me wrong  :P ::)

GeorgeOfTheJungle:
If you do an INPUT_PULLUP it's being driven. Very weakly, but driven. So... don't do that! In INPUT mode it's not being driven, and that's what "tri-stated" means: "not driven, floating".

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod