Fading LEDs via PWM

Current Part:

Parts
PIC 18F1330 Microcontroller
PICkit2
7805 +5v Regulator
2x 10kΩ Resistor
100Ω Resistor
47uF Capacitor
Assorted LEDs
2N2222
Breadboard
Wires
SIPS
9v Connector
Battery Holder

Parts List Details
           The parts list above shows everything I used to build this project. Below I have detailed out additional information on some of the more important parts. Take a look if you're curious.

PIC 18F1330
           The PIC will be used as our intelligent LED controller. It will be programmed with some firmware that will send out the digital PWM signal to change the brightness level of the LED. The internal 32 MHz (8 MHz + x4 PLL) oscillator will be used, so you won't need to buy an additional crystal!

7805 +5 Voltage Regulator
           This +5v regulator will be used create the power supply source for all of the electronics used in this circuit. Since the circuit is very small the actual load placed on this regulator will be small, maybe 100 miliamp.

PICkit 2
           The PICkit 2 is a programmer for the Microchip PIC microcontroller and it has a legacy for being one of the best, even with the 3rd version already available. You will need some programmer to get your programs onto the PIC and this is the one that I suggest.

2N2222 General Purpose Transistor
           This 2N2222 transistor will be used to control the LED's state between on and off. The transistor will be connected directly to the microcontroller which will send a signal telling the transistor what state it should be in: on or off.

Assorted LEDs
           A variety of LEDs is nice to have to test the system out, even though you really only need 1 led to see if everything is working. Your choice here.

Jumper Wires & Breadboard
           I prefer to use a breadboard with the projects in my articles because they offer maximum flexibilty with circuit design with minimal downtown between changes. In addition to the breadboard you will need jumper wire to get everything connected together.




;