New Article: Basic Hardware

Started by The Tone God, April 16, 2006, 03:30:08 AM

Previous topic - Next topic

The Tone God

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.

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.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

The Tone God

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

Quote from: R.G. on April 16, 2006, 03:24:43 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

Quote from: jrem on April 16, 2006, 03:36:30 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

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

Quote from: bioroids 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

Thanks Miguel! I appreciate it. :)

Andrew