Breadboarding the LED Flasher

 

 

  • Pin 14 is connected to the positive power supply rail. It is normally best to connect both siderails of the breadboard which are identified with red lines together for connection to positive. The two siderails which are identified with a blue line are normally connected together to form a ground.
  • C1 is a 0.1 µF capacitor which should be placed as close to the positive supply pin as possible. The other end is connected to ground. The best type to use is a tantalium capacitor because of their "speed". The microcontroller is capable of switching states (of pins etc.) extremely fast. When a state is switched on quickly and requires electon current flow there is a reluctance for the electrons to flow along the wires from the power supply for a very short period of time due to inductance. (The water analogy would explain this as the inertia of the water if you turned on a water valve at the end of a pipe. The pressure(voltage) at the end of the pipe would fall for a brief period of time. Electrons have very little mass so inertia is not a factor but the reluctance to flow is caused by the establishment of magnetic fields which hoccurs when an electron moves.) The function of this capacitor is provide a local source of electrons when electron flow is required which "decouples" the power pin of the microcontroller from the effects of the connecting wires to the power supply as described above. This is why it is known as a decoupling capacitor.
    • Danger: Tantaliums are polarized and can have a tendency to explode if incorrectly connected or subjected to overvoltages. We use 35 v tantaliums for this 5 v circuit. Make sure you check the + end and have it connected to pin 14.
  • Pin 4 has two functions. It is used during programming to clear the flash memory of the microcontroller with the application of 12 to 14 volts. During normal operation (program exicution) the pin is used to reset the microcontroller (to its first line of program code) if the pin is held low. For that reason we use R1, a 10k resistor as a pull up resistor to make sure the pin is held high.
  • A 4.0 MHz. crystal oscillator is connected between pin 15 and 16 to provide the external clock. Some crystals and ceramic resonators (a ceramic resonator is like a crystal except it is man made and not quite as accurate as a crystal) have a ground pin as well, this is usually the centre pin of the three pin oscillator. To run corectly capacitors need to be added to the crystals. Most crystals we use have the capacitors built in and are not needed.
  • In this example pin 7, port RB1 is connected to a LED. Note the LED is polarized. The long wire of a LED is typically positive. The positive lead can also be indicated by a small flat spot on the base of the plastic LED body.
Technological Design Home