MAin Menu

Course Synopsis

EMBEDDED SYSTEM APPLICATIONS covers the basic concept and application of microcontroller system based on Peripheral Interface Controller (PIC) microcontroller. Students will learn software and hardware development on microcontroller development system and understand how to do interfacing with external devices using suitable internal chip features. Students will be also exposed to the new Microcontroller Unit (MCU) simulation software.

Friday, March 25, 2011

3x3x3 LED cube with PIC16F877A

This is the first LED cube i made using PIC16F877A and 27 pieces of LED and 3 pieces of diodes for reverse bias pervention. The following Video is the result of 15 types of simulations:


I had assigned the LED into 9 columns and 3 layer. This means 12 output is needed for the simulation. Below is the circuit for the PIC controller and the LED cube.


PIC controller circuit


LED cube circuit

The 3 layers LEDs are sharing cathode and soldered to diode 1N4001 before fed to the PIC output pins. This is to ensure there will be no reverse bias going through the LEDs as the reverse bias threshold voltage is 5V. This will damage the LED. The connections of diodes are as shown in figure below. Normally the anode of the resistor will fed to 90 ohm - 100 ohm resistor to reduce the output voltage to approximately 3.3V. There is no resistor fed from the output pins for my LED cube because the output voltage of 4.4V seems OK for the LED.


Diode connection from cathode

The coding for this cube is basic ON & OFF plus some delay. All port B plus 1 RD7 are used as columns and RD4-6 is used as layers for example:

This is the main part of the program. For other style can be add-on with adding extra code. (I upload in JPEG form because the coding become different due to the coding conflict with .html)





LED cube for 5x5x5 will be the next target after LEDs reach... >.< limitation of PIC16F877A... Looking for ways to make it 8x8x8 or even more...

4 comments:

  1. gud work chong, let us share knowledge together...

    ReplyDelete
  2. sure sure...good thing must be shared...

    ReplyDelete
  3. hey dude, the code doesn't go with the led cube video on the page,isn't it?can you provide me with the codes? please. Thanks in advance. i would like to build a one for me.
    u can mail me at biplav_np@yahoo.com

    ReplyDelete
  4. can you mail the code sir.at arianjaygariando@gmail.com.

    ReplyDelete