Author Topic: New Article: Basic Hardware  (Read 3197 times)

The Tone God

New Article: Basic Hardware
« on: April 16, 2006, 03:30:08 AM »
Hello Everyone.

I posted a quick little article about hooking up basic hardware (LEDs, switches, crystals) to a uC called "Hardware Aware" at the site.

Enjoy.

The Tone God's Domain

Your Tone God,

Andrew


R.G.

Re: New Article: Basic Hardware
« Reply #1 on: April 16, 2006, 03:24:43 PM »
I think you missed an important item.

When you read a switch, even if you don't intend to debounce it properly, it's not good practice to simply have the port connect to the switch, which is often off the PCB. This sets you up for electrostatic discharges killing your  uC.

Instead, put a resistor in series with the pin going to the resistor. The resistor value doesn't have to be tightly specified as values from 1K to 100K all tend to work fine. The uC port when used as an input is a CMOS input and almost an open circuit anyway, to the resistor will not significantly affect the reading process. It may be a tad slower because of the gate input capacitance and the resistance, but it you're timed that tightly, you're too close to the edge anyway.

Any resistance in that input port pin will give the built in uC input protection diodes a chance to save the uCs life. No resistance may well let it get killed.
R.G.

Quick IQ Test: If anyone in a governmental position suspected that YOU had top-secret information on YOUR computer, how many minutes would you remain outside a jail cell?

The Tone God

Re: New Article: Basic Hardware
« Reply #2 on: April 16, 2006, 03:35:37 PM »
D'oh. Your right. I had that point on my list but forgot to put in there. Thats what I get for writing quickly when I'm half asleep.

I'll update it soon.

Thanks for pointing that out R.G. :)

Andrew

jrem

Re: New Article: Basic Hardware
« Reply #3 on: April 16, 2006, 03:36:30 PM »
Instead, put a resistor in series with the pin going to the resistor.

I'm assuming that's a typo and you mean " a resistor in series with the pin going to the switch".

If so, I don't do this with my switches (they are typically pin pulled high via 10k, switch pulls pin to ground) and, although I don't have a static problem here, I haven't cooked any of my devices yet.

So . . .   is this an absolute requirement?  If so then this is the first I've seen this precaution . . .

Regards, John.

The Tone God

Re: New Article: Basic Hardware
« Reply #4 on: April 16, 2006, 03:57:41 PM »
So . . .   is this an absolute requirement?  If so then this is the first I've seen this precaution . . .

Depends on who you are designing for and what they specify as requirements. It is good design practise that when interfacing something to the "outside world" to provide some type isolation/protection. You shouldn't rely on the pin protection diodes. They are there as a last resort.

This is one of those "it may be unlikely to happen but its a better safe the sorry" scenarios. It could be argued that if you are using a metal stompswitch which is connected to ground that would probably take the static hit before the actual circuit but that Murphy person likes to team up with Mother Nature and screw with you. All this is costing is a resistor which I consider a worth while investment and it does not affect the circuit operation in any major way.

I do include this in my designs and most production level designs I have seen do this as well.

Andrew

bioroids

Re: New Article: Basic Hardware
« Reply #5 on: April 16, 2006, 09:18:48 PM »
Hi, Tone God, nice articles this one and the other about power supplies.
I just had the time to read them now.

Thanks!

Miguel
Eramos tan pobres!

The Tone God

Re: New Article: Basic Hardware
« Reply #6 on: April 16, 2006, 11:47:36 PM »
Hi, Tone God, nice articles this one and the other about power supplies.
I just had the time to read them now.

Thanks!

Miguel

Thanks Miguel! I appreciate it. :)

Andrew