News for hackers. Stuff that matters.
Re:Programming ARM μC in Rust at four different levels of ab... by jsight on Thursday February 22, 2018 @05:04AM (#16436521)
Oh? When would you use this? I'm sure there must be some reason, but I can't think of one.
Re:Programming ARM μC in Rust at four different levels of ab... by bleke on Thursday February 22, 2018 @05:49AM (#16436688)
To prevent glitches it rarely problem but sometimes happens: imagine that default pin state must be high (on reset pin are floating) and moment you set pin mode to output it goes low, because data register is 0
Re:Programming ARM μC in Rust at four different levels of ab... by dbcurtis on Thursday February 22, 2018 @02:26PM (#16440584)
Consider a I/O pin set to open-drain drive. It either actively pulls the output pin to the ground rail, or the I/O floats. Externally, you have a pull-up resistor.

If there are multiple chips connected in open-drain, you write the I/O pin to 0 or 1 to either ground or float the pin. You read the I/O pin to see if anyone else has grounded it if you haven't. This was called "wired-OR" in the old days. (It's really AND, but was commonly used in DeMorgan equivalent form for communication buses before tri-state drivers became a thing. I'll get my cane and hobble back to my rocking chair now..)

Re:Programming ARM μC in Rust at four different levels of ab... by posterboy on Thursday February 22, 2018 @08:03PM (#16443252)
I think in the old days, before CMOS, this was called open-collector. I had learned about it in first semester digital logic not too long ago playing with the "high speed" 7400 series. If I remember correctly, the latch needs to support the open collector capability, but the reason escapes me.
Re:Programming ARM μC in Rust at four different levels of ab... by dbcurtis on Friday February 23, 2018 @03:06PM (#16449041)
Open collector if you have a bipolar technology. Modern microcontrollers are CMOS, so the pull-down transistor has a drain, not a collector. TTL is bipolar, so the transistor has a collector.
Re:Programming ARM μC in Rust at four different levels of ab... by InitialLastName on Thursday February 22, 2018 @11:19AM (#16438639)
As mentioned above, in some uC's the output register defines the pull direction when the pin is an input.

In other cases, you want to avoid glitching when the pin switches to an output on startup.

Re:Programming ARM μC in Rust at four different levels of ab... by arjo129 on Thursday February 22, 2018 @08:31AM (#16437383)
It can be used to implement capacitive touch.