Why should I care about resistors?
So here I was on the forums the other day and I came across a post asking
what the little resistors near the LPC actually did. While I would like to
assume most people hacking around in their boxes know what they are doing, sadly
I've been proven wrong on that more times than I care to say. So with that
in mind, here is a little knowledge base / tutorial about what some of those
components actually are and what they are there for.
Updated 28SEP2005 for factual error. -nB
Here is a site that will help you determine resistor color codes for through hole components: http://www.engplanet.com/content/resistorinfo.html The trouble with this is that the Xbox uses SMT (Surface Mount Technology) components which are too small for color coding, so they use a numeric three digit code:
First digit: first number in resistance
Second digit: Second number in resistance
Third (last) digit: number of zeros to add on the end
Thus the following examples:
101 = 100 ohms (10 with one zero added on)
100 = 10 ohms (10 with no zeros added on)
103 = 10,000 ohms
49R9 = 49.9 ohms (the R shows that there should be a decimal point)
An excerpt from: http://en.wikibooks.org/wiki/Electronics:Component_Identification#SMD.2FSMT_Resistors says it quite well:
SMD (surface mounted device) or SMT (surface mount
technology; same thing) resistors are found mostly on devices where
large scale integration is present. They generally use an alphanumeric
numbering system.
For surface mount resistors, a numerical code is used. For 10% tolerance resistors, 3 numbers are used, for 1% resistors, 4 digits are used. The scheme is similar to color codes, in that the first two or three digits are the base, and the last digit is the exponent. This is easy to remember as "the first digits then as many zeros as the last digit after it" ohms. "683" for instance, represents 68 with three zeros after it: 68 000 = 68 kΩ. Likewise, "4991" represents 499 with 1 zero after it: 499 0 = 4.99 kΩ. For small resistance values, an alternate notation is often used. For these, an R is used in place of the decimal. For example, 5R6 = 5.6 Ω. They are small. |
Now that we supposedly know how to read resistor values I will go into the specific example of the LPC resistors and what it is they do and why they need to be there.
The LPC (Low Pin Count) interface is specifically designed for peripheral expansion (much like the PCI bus, of which it is a subset). Now, many of you are likely used to the digital electronics concept of a TTL driver, the chip drives a voltage out to represent a "1" and pulls the signal to ground to represent a "0". While this method works fine when you have one chip talking to another, or even when you have one chip talking to many, it doesn't work so well when more than one chip may try talking at the same time.
What happens when you have one chip try to drive a 0 and another trying to drive a 1 at the same time? A lot of current flows across what is essentially a short circuit and one of the two chips dies (if you're lucky). How then do you put multiple devices on a bus and guarantee that you will never have this happen? Add a bunch of control circuitry and address lines. But what if you don't have the pins available to add the control lines? What if your little PIC micro can't drive the complex circuitry required? There is a simple solution: take away the ability of the chips to drive a "1".
So now things get interesting. When you make all your devices "open collector" you have essentially removed the transistor that puts out a voltage to drive a 1, but left in place the transistor that pulls the line to ground in order to output a 0. In this situation if more than one device wants to talk the data may get corrupted, but no damage will occur and you can simply ask the device to re-transmit. At this point you may be asking: yeah, but how do I transmit if I cant drive a 1? Those resistors are the answer.
Each of the LAD lines (as is the SDA line of the I2C bus) are capable of being connected to many devices, all of which have an open collector. The little resistors are 10K ohm pull-up resistors, that is to say they pull the lines voltage up when no chip on the bus is trying to pull it low. While this approach limits your total signal speed (33MHz on the LPC), it vastly reduces interface overhead and makes simple data busses easy to implement on small controllers.
The I2C bus is another example: The PIC, EEPROM, Video Encoder, and some of the LCDs all connect to the I2C bus, again through the same open collector principal.
The reason you can not simply replace a damaged resistor with a blob of solder (as I have seen some suggest), is that were you to do this, your pull-up would effectively be trying to drive as much current as it could into any chip trying to drive the bus to a 0, and in most conditions result in damage to any chips connected (mod, MCPx).
Update: Apologies for a factual error in the
piece above. The LPC interface is not an open collector interface, it is a
bi-directional interface requiring a turnaround where neither chip drives a
signal, yet the bus must remain high. The specifics about open collector
still applies, however. Thanks,
-nB
The next installment of this will focus on capacitors and the two separate roles they play in the Xbox.