Page 5 of 27

Re: Daily WTF

Posted: Mon Jun 09, 2008 5:12 pm
by Fred
jbelanger wrote:I'd be curious to hear what the Freescale people would think about that one: driving a 3.3V device from a 5V one by using the pin as an input.
You know what is REALLY funny!!???

Bill Lucas is responsible for that design, not Bruce! Image

Re: Daily WTF

Posted: Tue Jun 10, 2008 2:51 am
by MotoFab
jbelanger wrote:I'd be curious to hear what the Freescale people would think about that one: driving a 3.3V device from a 5V one by using the pin as an input.

That's a clever hack for bench testing but an automotive environment is not a friendly one for hacks. But it's going to be interesting to see what happens with that one.
Hey there Jean. I understand that using a current limit R on an input pin, and using the feature of the protection diodes, appears to be a hack.

The practice is legitimate though. It is approved practice for UL and CSA products. For example, in high voltage control subpanels used in swimming and bathing fixtures. An input pin is used as a zero crossing detector for the AC line voltage. That allows switch timing for thyristor-based duty-cycle control of high voltage inductive heating elements.

- Jim

Re: Daily WTF

Posted: Tue Jun 10, 2008 3:49 am
by jbelanger
MotoFab wrote:
jbelanger wrote:I'd be curious to hear what the Freescale people would think about that one: driving a 3.3V device from a 5V one by using the pin as an input.

That's a clever hack for bench testing but an automotive environment is not a friendly one for hacks. But it's going to be interesting to see what happens with that one.
Hey there Jean. I understand that using a current limit R on an input pin, and using the feature of the protection diodes, appears to be a hack.

The practice is legitimate though. It is approved practice for UL and CSA products. For example, in high voltage control subpanels used in swimming and bathing fixtures. An input pin is used as a zero crossing detector for the AC line voltage. That allows switch timing for thyristor-based duty-cycle control of high voltage inductive heating elements.

- Jim
Hi Jim,

Thank you for setting me straight. It's always good to learn new things. What threw me off was that Bruce mentioned that as a trick without any reference to where that came from.

By the way, do you have any links where I could see some examples.

Jean

Re: Daily WTF

Posted: Tue Jun 10, 2008 4:23 am
by MotoFab
Sure Jean. The example I gave above was from work I did in 2000. The UL lab raised only the slightest eyebrow to see what was was happening in the circuit. Here is a link to an app note from Microchip. http://ww1.microchip.com/downloads/en/A ... 00521c.pdf

There are more references out there, many microcontroller I/O pins have the same protection diode architecture. The garden variety '74HC' logic parts do as well.

Just goes to show that there's nothing new under the sun.

- Jim

Re: Daily WTF

Posted: Tue Jun 10, 2008 8:30 pm
by AbeFM
That's interesting, and not a bad trick, really. When you're new at electronics, and you look at a tiny little chip, you think "that's not made for high voltage" and run scared from anything over 9V. :-)

I'm curious about this 3.3v thing, though.... Is there a schematic showing what's going on?

Re: Daily WTF

Posted: Tue Jun 10, 2008 8:37 pm
by Fred
There is a vast difference between what they do in that pdf link and what Bruce/Bill have done. The latter only requires a software misconfiguration to burn. IMO that is a hack. The fact that it has been done before doesn't change that really.

Fred.

Re: Daily WTF

Posted: Wed Jun 11, 2008 11:26 am
by MotoFab
Fred wrote:There is a vast difference between what they do in that pdf link and what Bruce/Bill have done. The latter only requires a software misconfiguration to burn. IMO that is a hack. The fact that it has been done before doesn't change that really.
You think it represents bad design. And you think you know why it's bad design. Ok Fred.

One part is true enough, I don't determine if I contribute, you do.

- Jim

Re: Daily WTF

Posted: Wed Jun 11, 2008 12:48 pm
by MotoFab
Fred wrote:Double post and flagrant disregard for my wishes. Don't do it again!

Re: Daily WTF

Posted: Wed Jun 11, 2008 1:14 pm
by MotoFab
Fred wrote:The latter only requires a software misconfiguration to burn. IMO that is a hack. The fact that it has been done before doesn't change that really.
What do you mean by that "misconfiguration to burn" phrase? I see on the prev. page where you think an output vs. an output causes damage through a current limit R. Can you explain how that happens?

Serious technical question.

- Jim

Re: Daily WTF

Posted: Wed Jun 11, 2008 1:24 pm
by Fred
That is more like it! :-) Maybe we can be friends afterall.
Now, the 8 control lines from the router processor also need limiting as well. But - there is simply no more room left on the board for 8 resistors. So, we are using a little trick. The HCS12 processor ports can be configured as inputs or outputs, and there are internal 50K pullup resistors (really current sources). So what is done is to run the HCS12 in "open-drain" mode. What is done is to set the output register to zero. Next, the pull ups are enabled. Then the data-direction register on the HCS12 is used to control the output. For a logic zero, the port is configured as an output, and since there is a zero in the data register the output is a zero. For a logic one, the data direction register sets the processor port as an *input*, so there is no drive - but the pullup resistors raise the output port to 5V. The pullup resistors limit the current flowing into the CPLD, and we are good.
There are NO resistors between the 8 outputs and the CPLD inputs. The inputs are 3.3V and the outputs 5V. The software is configured to be in pullup/input mode to control these pins. In the event of the software being misconfigured to output mode again by a well meaning programmer there will be at the very least excessive heat from both cores and at the worst, both cores will lose a pin to over current.

Fred.