Truth tables NEVER lie

08/21/08 | by Jfkfhhfj | Categories: Informative

So we have diodes, resistors, transistors, capacitors, inducers, and whatnot. So how does this all come together to make computers?

At its heart, a transistor takes an input and provides an output. Alone its a fairly simple logic operation and transistors alone are usually used solely for switching current. However, when you combine them in fascinating ways you can create logic gates. Logic gates take inputs and provide outputs based on certain criteria. The simplest gates are NOT, AND, OR.

If you remember from high school mathematics, logic isn't that complicated. For these gates you have two inputs that are compared and an output that is determined by the input. The inputs will be A and B, the output Q and 1 represents high and 0 represents low.

NOT
Not is one of the most simplest gates, it takes the input and reverses it.
A->Q
1 0
0 1

AND
And merely outputs high when both A AND B are high, otherwise it outputs low.
A+B->Q
0 0 0
1 0 0
0 1 0
1 1 1

OR
Or outputs high when either input is high.
A+B->Q
0 0 0
1 0 1
0 1 1
1 1 1

Simple enough. We also have logic operations that are combination of the above. Combining OR and AND with NOT gives us NOR and NAND. This merely reverses the output as follows

NOR
A+B->Q
0 0 1
1 0 0
0 1 0
1 1 0

NAND
A+B->Q
0 0 1
1 0 1
0 1 1
1 1 0

Now ever more complicated we have logic gates that are slightly more complex. These are the Exclusive OR(XOR) and the Exclusive NOR(XNOR) gates.

XOR
The idea behind the XOR gate is that the inputs can be either or, but not BOTH. Hence it is exclusive to the OR function.
A+B->Q
0 0 0
1 0 1
0 1 1
1 1 0

XNOR
Reverse it.
A+B->Q
0 0 1
1 0 0
0 1 0
1 1 1

There we go, the simplest logic gates. With these logic gates we can make things like adders, flip flops and memory. We'll save the explanation of those for another day since it can get quite tedious.

Since the first post of this blog we've done a crash course in electronics, semiconductors and logic. Now that we understand the basics behind circuitry and electronics we can go ahead and start playing with our microcontrollers and begin learning how to make them do our bidding. Stay tuned as i go into the Binary and Hexadecimal number system and as we begin looking at assembly.

 

Semiconduct THIS

08/20/08 | by Jfkfhhfj | Categories: Informative

Even with the fundamentals laid down, electronics had little place to move in terms of computing. Vacuum tubes were very bulky and ate a lot of electricity to do simple tasks. Early computers took up whole rooms and had the computing power of most modern microcontrollers but, they did their job. It wasn't until the advancement of semi-conductors that we truly saw the miniaturization of electronics. With the semiconductor came the transistor and with the transistor and the advent of advanced photo etching processes we eventually got the integrated circuit and the microprocessor. This paved the way for modern electronics that now work on a scale of about 45 nanometers (a lone Si atom is .1 nanometers wide)

So what is so special about semiconductors? Silicon is the most famous semiconductor. Silicon in its natural state makes a nice lattice because it has 4 valance electrons and wants 8, so it bond with 4 other Si and makes a lattice. A lattice is very strong atomic structure and does not conduct electricity, thus making pure Silicon a insulator. However you can add impurities to silicon to change the way it conducts electricity. This is called doping. If you dope silicon with something like gallium(Ga)which has 3 valance electrons, you end up having a spare electron on the silicon that has no where to go. This lone electron is free to flow and thus, current flows. This type of silicon is called N-type and is a decent conductor. You can also dope silicon with something such as arsenic, which has 5 valance electrons. This creates a positive "hole" where a absence of electrons exists. Flowing electrons can take up this space and move the hole, this allows current to flow. This is called P-type and is also a decent conductor.

This is why silicon is a "Semiconductor" it will not conduct electricity in one state but will in another. Its not the states alone that are fascinating, but its what happens when you put them together.

The Diode

The diode is another fundamental component. Its basic function is to allow current in only one direction. This is crucial as it protects components and makes sure current only goes one way. It accomplishes this by creating a junction of P-type and N-Type silicon like so:
------------[(P-Type)|(N-Type)]------------

When you hook up a battery backwards like this:
(-)------------[(P-Type)|(N-Type)]------------(+)

The holes in the P-type are attracted to the negative terminal and the electrons are attracted to the positive terminal. No current is allowed to flow.

When you hook up a batter the correct way:
(+)------------[(P-Type)|(N-Type)]------------(-)

The electrons are repealed by the negative terminal as the holes are to the positive terminal. At the junction the electrons meet with holes and begin filling them. Current flows across the junction.

The diode only allows current to flow when it is properly placed in a circuit. However it isn't nearly as significant as the next component.

The Transitor

Without the transistor, none of this would be possible. The transistor is the modern computer. A transistor is merely a diode, but going one step further. A transistor features 3 layers of doped silicon usually arranged as PNP or NPN (hence NPN And PNP transistors) by adding this third layer, you can create a switching effect. In a PNP transistor by supplying current to the middle layer you allow current to flow throughout the device. This fundamentally allows a small current to switch a large one.

By having this ability you can begin to build Boolean gates out of arrangements of transistors. If you have logic you can make computers.

This is the story of the semiconductor! After it was born it was a mad dash to implement complicated logic gates as well as the race to make the transistor smaller and smaller. This race lead us to our faithful component, the Microcontroller.

 

Let there be light!

08/20/08 | by Jfkfhhfj | Categories: Informative

Our modern world would be nothing like it is today without electricity. Electricity has enabled man to create devices that truly work on an atomic scale. We can cram more power into smaller devices with more and more capabilities. What intrigues us most about electricity is that is based on such a simple concept.

Likes attract, opposites repel. Electricity is made from electrons (REALLY?) these electrons have a negative charge. The fundamental of electricity is to creates charge difference that induces electrons to flow. With this charge difference work can be done. Voltage is defined as the potential difference in charge, so where there is voltage there can be work done. By connecting two objects with a potential difference with a conducting material (wire) the charge evens out as the electrons flow from negative to positive. Now, when you take this idea and add fun things like semiconductors, you get our modern world.

The Fundamentals

All flowing charges are made up of two things, Current which is measured in amperage and voltage(potential difference) measured in volts. For a circuit to be useful there must be some type of resistance, without resistance, your current flows as fast as it can and as much as it can. This wastes energy and you might end up vaporizing your wire due to so much current and heat. So we invent these things called resistors.

A resistor just simple, resists electrical flow and slows things down. They produce a limit on current and they allow us to supply reasonable amounts of current to devices without them all catching on fire. Resistance is measured in Ohms.

The Formula

V=IR is one of the most important formulas you can ever get to know. It states that Voltage(in volts) is equal to Resistance(in ohms) multiplied by Current(in amps). This lets you determine how much resistance you need to supply to a voltage to limit to a set current, or any other adaptation.

Another fundamental component is the Capacitor. Capacitors are measured in Farads. The job of a capacitor is to hold a charge. It does this by placing opposing charges on opposite plates separated by a dielectric(insulator). By holding a charge a capacitor stores energy. Although they don't hold nearly enough energy to work as batteries, their main advantage comes form the fact they can discharge extremely rapidly. Common uses for this ability are the flash in your camera. The camera charges a large capacitor and dumps all the electricity at once into the light bulb, creating an intense flash. Capacitors are use in timing circuits, smoothing out ripples in power supplies, filtering frequencies and storing energy. Capacitors are extremely useful and find their way in practically every circuit.

The inductor. This component is about as simple as you can get. A inductor is simple a coil of wire. The special thing about a coil or wire is the fact it builds up a magnetic field when charge is put though it. As the current through the coil changes, the magnetic field resists this change. Because of this an inductor, like a capacitor can store energy in a magnetic field. Inductors are measured in Henrys. Inductors are primarily use to regulate frequencies since a capacitor and inductor in series creates a harmonic circuit.

With these fundamentals we were able to create simple devices such as radios and gain the ability to transmit power, generate locomotion and light our homes. It wasn't until the invention of the semiconductor and the transistor that our modern lives really took off.

 

Hello world!

08/19/08 | by Jfkfhhfj | Categories: General

Welcome to the awesome world of microcontrollers! Lets start things off by talking a little about myself. I am a Freshman at Stony Brook University pursuing a degree in Physics and Computer Engineering. I am mostly self taught on my knowledge on circuitry and MCUs. I have done tons of research over the past few months as well as faced my own share of buggy code and non compliant hardware.

I mostly work with the PIC series of MCUs and i do all my work in assembly. I have experience in C but i prefer assembly as it gets you much closer to the device and the inner workings of the hardware. I am working on several projects including robotics, simple displays and other digital systems. Over the next few days i will be posting my writings on how to get into working with microcontrollers and my code and resources.

I hope you enjoy as i defiantly will writing and researching ^.^

 

Pages: 1 2 3 4 6

February 2017
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28        

Ads by Google

Mcuplace.com Store!

This blog is dedicated to working with digital circuitry and the use of microcontrollers, small compact computers on a chip. I will be encompassing many techniques to develop projects, tools to use to write and assemble code and i will be sharing any projects i am currently working on. User feedback is a must! I do not know it all, hell im not even that experienced, but without a general place to get all the info needed i find it very hard to get into the world of microcontrollers without pursing a CE degree. So come one come all and enter the world of mystery and creativity!

Search

  XML Feeds

multiblog engine