WWW Scribd
WWW Scribd
Document Information
3D LED CUBE DISPLAY (
Download
Download as pdf or txt
Submitted by
RANDEEP KUMAR
SHARUK K.A
UNNI V.S
VISHNU PRASAD C.V
Focus on Excellence
Affiliated to
May 2011
Affiliated to
May 2011
™
FEDERAL INSTITUTE OF SCIENCE AND TECHNOLOGY (FISAT)
Mookkannoor (P.O), Angamaly-683577
Upload to Download
Focus on Excellence
CERTIFICATE
OR
This is to certify that the mini project report titled 3D LED CUBE DISPLAY
(8x8x8 PIXELS) submitted by Randeep Kumar, Sharuk K.A, Unni V.S,
Become a Scribd
Vishnu member
Prasad C.V to fulfillment
, towards partial read and of thedownload
requirements forfull
the
documents.
award of the degree of Bachelor of Technology in Electronics and
Communication Engineering is a record of bonafide work carried out by them
during the academic year 2010 –2011
Start your 30 day free trial
Staff in charge Head of the Department
Place:
Date:
ACKNOWLEDGEMENT
We are greatly indebted to our project guides Mrs. Hima Mary John ,
Mr.Nandakumar, Mrs. Shamseena M.A for this scholarly assistance, kind treatment
Upload to Download
encouragement and timely help in every possible manner. We feel it due mentioning the
dedication, sincerity and whole hearted co-operation that they extended to us. We hereby
extended our sincere thanks to the laboratory staff Mrs. Bini T Abraham and all others as
well for giving their support in realizing the goal.
OR
Our sincere gratitude is expressed and extended to all our friends and to all those
who have contributed directly or indirectly to make this endeavour a success. Above all, we
express our overwhelming gratitude to the almighty for the success of our project. Without
documents.
ABSTRACT
Upload to Download
spacing is a trade-off between how easy the layers behind it are seen, and voxel fidelity.
Since it is a lot more work making a LED cube than a LED display, they are usually low
resolution. A LED display of 8x8 pixels are only 64 LEDs, but a LED cube in 8x8x8 is 512
LEDs, an order of magnitude harder to make! This is the reason LED cubes are only made
OR
in low resolution. A LED cube does not have to be symmetrical; it is possible to make a
7x8x9, or even oddly shaped ones. Here we have an 8x8x8 shaped one. The code is written
in the C language using AVR studio and it is burned into the microcontroller using the pony
prog 2000.The circuit needs to be mounted on the mechanical structure or platform where
Become a Scribd
it displays the patternsmember
that are stored into read andas indicated
the microcontroller download
in the codes.full
The
documents.
patterns are displayed on a 3D structure which is made up of stainless steel rods. The
messages can be changed as per user need by rewriting the microcontroller’s in-built
memory. The complete display system circuit is power supply run on 5V, 2A which is
CONTENTS
Chapter 3
OR
CIRCUIT DIAGRAMS AND EXPLANATION 5
Chapter 6 RESULTS 21
Components List 23
Appendix 25
Upload to Download
OR
Upload to Download
OR
1. INTRODUCTION
You're Reading a Preview
A microcontroller is a computer. All computers whether talk about a personal desktop
computer or a large mainframe computer or microcontrollers have several things in
Upload to Download
Microcontrollers are often low- power devices. A desktop computer is almost always
plugged into a wall socket and might consume 50 watts of electricity. A microcontroller has
a dedicated input device and often (but not always) has a small LED or LCD display for
output. A microcontroller is often small and low cost. Today the technology has advanced
OR
to such an extent that has come a need to display electronic messages to satisfy all
purposes, whether it is business or domestic use. The solution found to satisfy this need is
the matrix display systems using LED‟s and LCD‟s. Different kinds of matr ix systems are
available today which are capable of displaying messages, graphics, logos and moving
Become a Scribd
animation member
that are sure to capture andto
holdread andof any
the attention download full
audience. It provides
instantaneous, flexible communications when and where they‟re needed most. This LED
documents.
cube has 512 LEDs. Obviously, having a dedicated IO port for each LED would be very
impractical. We would need a micro controller with 512 IO ports, and run 512 wires
through the cube. Instead, LED cubes rely on an optical phenomenon called persistence of
Start your 30 day free trial
vision (POV).If we flash a led really fast, the image will stay on our retina for a little while
after the led turns off. By flashing each layer of the cube one after another really fast, it
gives the illusion of a 3d image, when in fact we are looking at a series of 2d images
stacked onto one another. This is also called multiplexing. With this setup, we only need 64
(for the anodes) + 8 (for each layer) IO ports to control the LED cube. The main purpose of
our project is to build a 3D LED cube display using an ATMEGA32, high performance,
low power Atmel AVR 8-bit Microcontroller. It has advanced RISC architecture and 131
powerful instructions with most single clock cycle execution and 32 x 8 general purpose
working registers. Its function is to display the different patterns in 3D using 512 LED‟s.
By moving them fast enough, the output will be a human identifiable pattern or character.
Upload to Download
OR
Upload to Download
230 V, 50 Hz AC Supply
OR
Upload to Download
2.2.2 Microcontroller
OR
The ATMEGA32 is a low power, high performance CMOS 8-bit microcomputer with
32K bytes of Flash programmable and 1K bytes of EEPROM .The on chip Flash
allows the program memory to be reprogrammed in system or by a conventional
nonvolatile memory programmer. It has 32x8 general purpose working registers with
Become
131 a Scribd
powerful member to read and download full
instructions.
documents.
2.2.3 Mosfet (Irfz44)
The 74HC/HCT573 are high-speed Si-gate CMOS devices and are pin
compatible with low power Schottky TTL (LSTTL). They are specified incompliance
with JEDEC standard no.7A.The 74HC/HCT573 are octal D-type transparent latches
featuring separate D-type inputs for each latch and 3-state outputs for bus oriented
applications. A latch enable (LE) input and an output enable (OE) input are common
This 3D led cube is made up of stainless steel rods with 512 led‟s. There are
64 anodes 8 cathodes. The LED cube is made up of columns and layers. The cathode
Upload to Download
legs of every LED in a layer are soldered together. All the anode legs in one column
are soldered together. Each of the 64 columns is connected to the controller board
with a separate wire. Each column can be controlled individually. Each of the 8 layers
also has a separate wire going to the controller board. Each of the layers is connected
OR
to a transistor that enables the cube to turn on and off the flow of current through each
layer.
Upload to Download
OR
The components used in the Fig 3.1 and their values are given below,
Microcontroller
Upload to Download ATMEGA32-P
Q1 - Q8 (N-Mosfet) IRFZ44
P1 OR 2 Pin Header
P2 ISP Header
Become
P3 –a Scribd member to read and download
P11 8 Pin Header full
U2 – U9 (D – Latch)
documents. 74HC573
R2 – R9 1KΩ Resistors
R10 – R17,Start
R20 – R27,your
R30 – R3730 day free trial
C1, C3 22PF
C2 10PF
Upload to Download
OR
Fig 3.1
schematic
controller board
Upload to Download
OR
3.2 Explanation
You're Reading a Preview
A LED cube is like a LED screen, but it is special in that it has a third dimension, making it
This LED cube has 512 LEDs. Obviously, having a dedicated IO port for each LED
Become a beScribd
would member
very impractical. to read
Thus there comes the need and download
of a micro controller with 512full
IO
documents.
ports, and run 512 wires through the cube. Instead, LED cubes rely on an optical
phenomenon called persistence of vision (POV). When a led is flashed really fast, the
image will stay on the retina for a little while after the led turns off. By flashing each layer
In order to light up an LED, we have to run current from the anode to the cathode.
The LED cube is made up of columns and layers. The cathode legs of every LED in a layer
are soldered together. All the anode legs in one column are soldered together. Each of the
64 columns is connected to the controller board with a separate wire. Each column can be
controlled individually. Each of the 8 layers also has a separate wire going to the controller
board. Each of the layers is connected to a transistor that enables the cube to turn on and off
The control unit is quite simple, 3 ports of the Mega32 were used:
OR
one port controls 8 FETs for sinking the 8 ground layers
one port is wired to all 8 8bit d-latch inputs
Become a Scribd
the last port is member
used to enable the to read
d-latch inputs and download full
documents.
Since the d-latches are only able to sink or source 70mA on all 8 latches, we had to limit the
diode current to ~9mA, which is fairly enough for this type of LED .
Upload to Download
OR
4. PCB
You're Reading a Preview
4.1 PCB Component Layout
Upload your documents to download.
Upload to Download
OR
Upload to Download
OR
Upload to Download
OR
A printed circuit board, or PCB, is used to mechanically support and electrically connect
Upload to Download
printed circuit board assembly (PCBA).
PCB‟s are inexpensive, and can be highly reliable. They require much more layout
effort and higher initial cost than either wire-wrapped or pint-to-point constructed circuits,
OR
but are much cheaper and faster for high- volume production. Much of the electronics
industry‟s PCB design, assembly and quality control needs are set by standards that are
published by the IPC organization.
Become
4.4.1amaterials
Scribd member to read and download full
documents.
Conducting layers are typically made of thin copper foil. Insulating layers dielectric
are typically laminated together with epoxy resin prepreg. The board is typically coated
Upload to Download
electroplating steps.
There are three common “subtractive methods (methods that remove copper) used for the
production of printed circuit boards.
OR
1. Silk Screen printing uses etch-resistant inks to protect the copper foil. Subsequent
etching removes the unwanted copper. Alternatively, the ink may be conductive, printed on
a blank (non conductive) board. The latter technique is also used in the manufacture of
2. Photoengraving uses a photomask and chemical etching to remove the copper foil from
documents.
the substrate. The photomask is usually prepared with a photo plotter from data produced
by a technician using CAM, or computer-aided manufacturing software.
Upload to Download
OR
Upload to Download
This simple AVR Programmer will allow you to painlessly transfer hex programs to most
ATMEL AVR microcontrollers without sacrificing your budget and time. It is more reliable
than most other simple AVR programmers available out there and can be built in very short
amount of time.
OR
OR
Pony Prog is a serial device programmer software with a user-friendly GUI frame work
Upload to Download
OR
Upload to Download
Upload to Download
Initialization
OR
documents.YES
Call the
Start your 30 function
day
cube
free trial
explosion ()
Display
String
“FISAT”
A B
Upload toCallDownload
functions
block wipe (),
cube_2_auto (),
cube_wipe (),
cube_waves (),
OR
cube_explosion (),
cube_stripes ()
Upload to Download
OR
6. RESULTS
You're Reading a Preview
After successfully completing this project we came to know more about our project. It gave
Upload your documents to download.
us a lot of experience which will help in our future. The main advantages and limitations of
the project were identified. There are many applications for our project like in the field of
advertising, for making toys, to use as a study material, etc…. but the only limitation of this
Upload to Download
project we had found is that it requires complete darkness, as it deals with the light. Since it
consists of the LED‟s it should be kept in a dark room for the perfect output.
OR
Upload to Download
OR
Upload to Download
project we also came to know about the advantages and disadvantages of our project and its
future development. Today we have a 3D world; a 3D revolution will be formed in the
upcoming years. This project can be upgraded to a great extent by suitable add-ons and we
expect a bright future for our project in the coming years . The main applications of our
OR
project include toys, advertisements, study material, research purposes etc………
3 Upload to Download
MOSFET IRFZ44 (N 8
CHANNEL)
4 LARGE PROTOTYPE MEDIUM SIZE 3
PCB‟S
5 MICROCONTROLLER OR ATMEGA32 1
6 D LATCH 74HC573 8
Become a Scribd
8 member
TRANSISTORto readBC547
and download
1 full
9
documents.
CRYSTAL
OSCILLATOR
16MHz 1
15 MISCELLANEOUS - -
Available: http://www.atmel.com/dyn/resources/prod_documents/doc2503.pdf
[2] (2011, Apr). Atmel AVR Microcontroller Primer: Programming and Interfacing
Upload to Download
(Synthesis Lectures on Digital Circuits and Systems)
[4] (2005-2010).
[5] (2005-2010). OR
Upload to Download
OR
Upload to Download
OR
AB
Upload to Download
#ifndef AB_H
#define AB_H
#include <inttypes.h>
#ifndef ANIMATIONS_H
documents.
#define ANIMATIONS_H
#define SHOW_BELT_DELAY 50
void show_belt(char *belt);
#define CUBE_AUTO_DELAY 60
void cube_2_auto( void );
#define STRIPES_DELAY 60 OR
void cube_stripes( void );
#define EXPLOSION_DELAY 10
documents.
void cube_explosion( void );
#define SWIPE_DELAY 60
void cube_wipe( void );
#define CUBE_STRING_DELAY 5
void cube_string( char *string );
#define OUTLINE_DELAY 60
void cube_outline( void );
#define SONIC_DELAY 40
void cube_sonic( void );
#define WAVES_DELAY 3
#define WAVES_DEPTH 255
void cube_waves( void );
#define STARS_DELAY 40
void cube_stars( void );
#include <stdlib.h> OR
#include <avr/io.h>
#include <inttypes.h>
uint8_t cube[8][8];
Become a Scribd member to read and download full
void cube_show_init( void );
TRANSLATION
#ifndef TRANSLATION_H
#define TRANSLATION_H
Upload to Download
void move_x_rev( uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2 );
#endif
ROTATION
OR
#ifndef ROTATION_H
#define ROTATION_H
Become a Scribd
#include <stdlib.h> member to read and download full
#include <avr/io.h>
#include <inttypes.h>
documents.
#define CL_LOOP_DELAY 30 //was 6
void rotate_90_auto ( uint8_t cycle );
#endif
Source Files
Upload to Download
#include <inttypes.h>
#include <math.h>
#include "ab.h"
OR
{
switch (ch)
{
case '0':
cube[0][2] |= z;
cube[0][3] |= z;
Become a Scribd member to read and download full
cube[0][4] |= z;
cube[1][1] |= z;
documents.
cube[1][5] |= z;
cube[2][1] |= z;
cube[2][2] |= z;
cube[2][5] |= z;
cube[3][1] |= z;
Start your 30 day free trial
cube[3][3] |= z;
cube[3][5] |= z;
cube[4][1] |= z;
cube[4][4] |= z;
cube[4][5] |= z;
cube[5][1] |= z;
cube[5][5] |= z;
cube[6][2] |= z;
cube[6][3] |= z;
cube[6][4] |= z;
break;
case '1':
cube[0][2] |= z;
cube[0][3] |= z;
cube[0][4] |= z;
cube[1][3] |= z;
cube[2][3] |= z;
cube[3][3] |= z;
cube[0][1] |= z;
cube[0][2] |= z;
cube[0][3] |= z;
Upload to Download
cube[0][4] |= z;
cube[0][5] |= z;
cube[1][2] |= z;
cube[2][3] |= z;
cube[3][4] |= z;
cube[4][5] |= z;
cube[5][1] |= z;
cube[5][5] |= z; OR
cube[6][2] |= z;
cube[6][3] |= z;
cube[6][4] |= z;
cube[2][4] |= z;
cube[2][5] |= z;
cube[3][1] |= z;
Upload to Download
cube[0][3] |= z;
cube[0][4] |= z;
cube[1][1] |= z;
cube[1][5] |= z;
cube[2][5] |= z;
cube[3][5] |= z;
cube[4][1] |= z;
cube[4][2] |= z; OR
cube[4][3] |= z;
cube[4][4] |= z;
cube[5][1] |= z;
case '7':
cube[0][2] |= z;
cube[1][2] |= z;
Upload to Download
case '8':
break;
cube[0][2] |= z;
cube[0][3] |= z;
cube[0][4] |= z;
cube[1][1] |= z;
cube[1][5] |= z;
cube[2][1] |= z; OR
cube[2][5] |= z;
cube[3][2] |= z;
cube[3][3] |= z;
cube[6][3] |= z;
cube[6][4] |= z;
break;
Upload to Download
cube[6][2] |= z;
cube[6][3] |= z;
cube[6][4] |= z;
cube[6][5] |= z;
break;
case ':':
cube[1][2] |= z;
cube[1][3] |= z; OR
cube[2][2] |= z;
cube[2][3] |= z;
cube[4][2] |= z;
case '.':
documents. break;
cube[1][2] |= z;
cube[1][3] |= z;
cube[0][3] |= z;
cube[0][5] |= z;
cube[1][1] |= z;
Upload to Download
cube[6][2] |= z;
cube[6][3] |= z;
break;
case 'a':
cube[0][1] |= z;
cube[0][5] |= z;
cube[1][1] |= z;
cube[1][5] |= z; OR
cube[2][1] |= z;
cube[2][2] |= z;
cube[2][3] |= z;
cube[3][3] |= z;
cube[3][4] |= z;
cube[4][1] |= z;
Upload to Download
cube[0][2] |= z;
cube[0][3] |= z;
cube[0][4] |= z;
cube[1][5] |= z;
cube[1][1] |= z;
cube[2][1] |= z;
cube[3][1] |= z;
cube[4][1] |= z; OR
cube[5][1] |= z;
cube[5][5] |= z;
cube[5][1] |= z;
cube[0][1] |= z;
cube[0][2] |= z;
cube[0][1] |= z;
cube[0][2] |= z;
cube[0][3] |= z;
Upload to Download
cube[5][1] |= z;
cube[6][1] |= z;
cube[6][2] |= z;
cube[6][3] |= z;
cube[6][4] |= z;
cube[6][5] |= z;
case 'f':
break;
OR
cube[0][1] |= z;
cube[1][1] |= z;
cube[2][1] |= z;
cube[3][4] |= z;
cube[3][5] |= z;
cube[4][1] |= z;
Upload to Download
cube[1][1] |= z;
cube[1][5] |= z;
cube[2][1] |= z;
cube[2][5] |= z;
cube[3][1] |= z;
cube[3][2] |= z;
cube[3][3] |= z;
cube[3][4] |= z; OR
cube[3][5] |= z;
cube[4][1] |= z;
cube[4][5] |= z;
cube[2][4] |= z;
cube[3][4] |= z;
cube[4][4] |= z;
cube[0][1] |= z;
cube[0][5] |= z;
cube[1][1] |= z;
Upload to Download
cube[1][4] |= z;
cube[2][1] |= z;
cube[2][3] |= z;
cube[3][1] |= z;
cube[3][2] |= z;
cube[4][1] |= z;
cube[4][3] |= z;
cube[5][1] |= z; OR
cube[5][4] |= z;
cube[6][1] |= z;
cube[6][5] |= z;
cube[3][5] |= z;
cube[4][1] |= z;
cube[4][3] |= z;
Upload to Download
cube[0][1] |= z;
cube[0][5] |= z;
cube[1][1] |= z;
cube[1][5] |= z;
cube[2][1] |= z;
cube[2][4] |= z;
cube[2][5] |= z;
cube[3][1] |= z; OR
cube[3][3] |= z;
cube[3][5] |= z;
cube[4][1] |= z;
cube[6][4] |= z;
break;
case 'p':
Upload to Download
cube[5][1] |= z;
cube[5][5] |= z;
cube[6][1] |= z;
cube[6][2] |= z;
cube[6][3] |= z;
cube[6][4] |= z;
case 'q':
break;
OR
cube[0][2] |= z;
cube[0][3] |= z;
cube[0][5] |= z;
cube[3][2] |= z;
cube[3][3] |= z;
cube[3][4] |= z;
Upload
case 's':
to
cube[0][1] |= z; Download
cube[0][2] |= z;
cube[0][3] |= z;
cube[0][4] |= z;
cube[1][5] |= z;
cube[2][5] |= z;
cube[3][2] |= z; OR
cube[3][3] |= z;
cube[3][4] |= z;
cube[4][1] |= z;
Start cube[0][3]
your |=|=30
cube[1][3]
z;
z; day free trial
cube[2][3] |= z;
cube[3][3] |= z;
cube[4][3] |= z;
cube[5][3] |= z;
cube[6][1] |= z;
cube[6][2] |= z;
cube[6][3] |= z;
cube[6][4] |= z;
cube[6][5] |= z;
break;
case 'u':
cube[0][2] |= z;
cube[0][3] |= z;
cube[0][4] |= z;
cube[1][1] |= z;
cube[1][5] |= z;
cube[2][1] |= z;
Upload to Download
case 'v':
break;
cube[0][3] |= z;
cube[1][2] |= z;
cube[1][4] |= z;
cube[2][1] |= z;
cube[2][5] |= z;
cube[3][1] |= z; OR
cube[3][5] |= z;
cube[4][1] |= z;
cube[4][5] |= z;
break;
case 'x':
cube[0][1] |= z;
Upload to Download
cube[5][5] |= z;
cube[6][1] |= z;
cube[6][5] |= z;
break;
case 'y':
cube[0][3] |= z;
cube[1][3] |= z;
cube[2][3] |= z; OR
cube[3][2] |= z;
cube[3][4] |= z;
cube[4][1] |= z;
default:
break;
}
}
You're Reading a Preview
AN I MA TI ONS
cube[7][7-j] |= ( 1 << i );
}
cube_show_loop(STRIPES_DELAY);
char cube2_arr[4][4];
Upload to Download
for (uint8_t i = 0; i < 4; i++){
cube2_arr[i][j] = 0;
} OR
}
Upload to Download
cube2_arr[0][1] |= (1 << 3);
OR
cube2_arr[1][0] |= (1 << 3);
cube_2_auto_show(cube2_arr);
uint8_t x = rand()%4;
uint8_t y = rand()%4;
uint8_t z = rand()%4;
switch (rand()%6)
{
case 0:
while(y < 3) {
if (cube2_move_y_fwd(cube2_arr, y, x, z) == 0)
{
cube_2_auto_show(cube2_arr);
} else { break; }
}
Upload your documents
case 1:
to download. break;
while(y > 0) {
if (cube2_move_y_rev(cube2_arr, y, x, z) == 0)
{
Upload to Download
cube_2_auto_show(cube2_arr);
y--;
} else { break; }
}
break;
case 2:
OR
while(x < 3) {
if (cube2_move_x_fwd(cube2_arr, y, x, z) == 0)
{
cube_2_auto_show(cube2_arr);
} else { break; }
documents.
}
break;
case 3:
while(x > 0) {
cube_2_auto_show(cube2_arr);
x--;
} else { break; }
}
break;
case 4:
while(z < 3) {
if (cube2_move_z_fwd(cube2_arr, y, x, z) == 0)
{
cube_2_auto_show(cube2_arr);
z++;
} else { break; }
}
break;
case 5:
while(z > 0) {
if (cube2_move_z_rev(cube2_arr, y, x, z) == 0)
{
You're Reading a Preview cube_2_auto_show(cube2_arr);
z--;
} else { break; }
Upload your documents
}
break;
to download.
default:
break;
}
}
}
Upload to Download
}
OR
uint8_t cube2_move_y_fwd( char cube2[4][4], uint8_t y, uint8_t x, uint8_t z )
{
}
return 1;
documents.
uint8_t cube2_move_y_rev( char cube2[4][4], uint8_t y, uint8_t x, uint8_t z )
{
Start your 30 day free trial
if (!(cube2[y-1][x] & (1 << z))){
cube2[y][x] &= ~(1 << z);
cube2[y-1][x] |= (1 << z);
return 0;
}
return 1;
}
return 1;
}
uint8_t cube2_move_x_rev( char cube2[4][4], uint8_t y, uint8_t x, uint8_t z )
{
You're Reading a Preview
if (!(cube2[y][x-1] & (1 << z))){
cube2[y][x] &= ~(1 << z);
cube2[y][x-1] |= (1 << z);
Upload your documents to download.
}
return 0;
return 1;
}
Upload to Download
uint8_t cube2_move_z_fwd( char cube2[4][4], uint8_t y, uint8_t x, uint8_t z )
{
if (!(cube2[y][x] & (1 << (z+1)))){
cube2[y][x] &= ~(1 << z);
cube2[y][x] |= (1 << (z+1));
return 0;
}
return 1; OR
}
cube_clear_layer(layer*2+1);
cube_clear_layer(layer*2);
for (uint8_t x = 0; x < 4; x++){
for (uint8_t z = 0; z < 4; z++){
if (cube2[layer][x] & ( 1 << z)) {
cube[layer*2][x*2] |= (1 << (z*2));
cube[layer*2][x*2] |= (1 << (z*2+1));
cube[layer*2][x*2+1] |= (1 << (z*2));
cube[layer*2][x*2+1] |= (1 << (z*2+1));
cube[layer*2+1][x*2] |= (1 << (z*2));
}
Upload your documents to download.
cube_show_loop(CUBE_AUTO_DELAY);
move_y_rev(4,0,5,1);
cube_show_loop(CUBES2_DELAY);
}
Upload to Download
for (uint8_t i = 0; i < 6; i++) {
move_z_fwd(0,2,1,3);
cube_show_loop(CUBES2_DELAY);
}
}
cube_show_loop(CUBES4_DELAY);
for (uint8_t fourtimes = 0; fourtimes <= 3; fourtimes++){
}
Upload your documents to download.
for (uint8_t fourtimes = 0; fourtimes <= 3; fourtimes++){
move_z_fwd(0,0,3,3);
cube_show_loop(CUBES4_DELAY);
}
for (uint8_t fourtimes = 0; fourtimes <= 3; fourtimes++){
Upload to Download
move_y_fwd(0,4,3,7);
cube_show_loop(CUBES4_DELAY);
}
for (uint8_t fourtimes = 0; fourtimes <= 3; fourtimes++){
move_y_rev(4,4,7,7);
cube_show_loop(CUBES4_DELAY);
}
OR
for (uint8_t fourtimes = 0; fourtimes <= 3; fourtimes++){
move_x_rev(0,0,3,3);
cube_show_loop(CUBES4_DELAY);
}
}
for (uint8_t fourtimes = 0; fourtimes <= 3; fourtimes++){
move_z_rev(0,0,3,3);
}
You're Reading a Preview
}
cube_show_loop(CUBES4_DELAY);
Upload to Download
cube[i][0] = 0b10000001;
cube[i][7] = 0b10000001;
}
for (uint8_t i = 1; i < 7; i++){
cube[0][i] = 0b10000001;
cube[7][i] = 0b10000001;
}
cube[0][0] = 0xFF; OR
cube[7][0] = 0xFF;
cube[0][7] = 0xFF;
cube[7][7] = 0xFF;
}
cube[2][2] = 0b00111100;
cube[5][2] = 0b00111100;
/* wipe */
void cube_wipe( void )
{
Upload to Download
for (uint8_t layer = 0; layer < 7; layer++){
move_y_rev(0,0,7,7);
cube_show_loop(SWIPE_DELAY);
}
}
OR
void cube_string_belt( char *string )
{
Become a Scribd
for (uint8_t i =member to read = 0; and download full
char cube_belt[25];
0; i < 25; i++) { cube_belt[i] }
string++;
string++;
documents.
while(*string){
set_char_to_belt(*string, cube_belt);
belt[i-1] = belt[i-2];
}
belt[0] = 0;
}
You're Reading a Preview
void set_char_to_belt( char character, char *belt )
{
cube_clear();
Upload your documents to download.
cli();
PORTC = 0x00;
cube_char(character, 1);
for (uint8_t layer = 0; layer < 8; layer++) {
for (uint8_t i = 1; i < 6; i++){
Upload to Download
if (cube[layer][i] & 0x01)
belt[5-i] |= (1 << layer);
}
}
cube_clear();
sei();
}
OR
void show_belt( char *belt )
{
cube_clear();
Become
voida Scribd member char *string )to read and download full
/* back to front moving */
cube_string_to_front(
{
while(*string) {
_delay_ms(200);
documents.
for (uint8_t i = 8; i > 0; i--){
_delay_ms(200);
while(*string){
cube_clear();
cli();
cube_explosion();
cube_explosion();
}
Upload to Download
cube[i][7] |= 128;
cube_show_loop(OUTLINE_DELAY);
}
cube_show_loop(20);
/* shrink */
cube_clear();
cube[1][1] = 0b01111110;
cube[1][6] = 0b01111110; OR
cube[6][1] = 0b01111110;
cube[6][6] = 0b01111110;
for (uint8_t i=2; i< 6; i++) {
}
documents.
cube[i][6] = 0b01000010;
cube_show_loop(30);
rotate_90_auto( 8 );
cube_show_loop(STARS_DELAY);
}
}
}
You're Reading a Preview
void cube_waves( void )
Upload your documents to download.
{
cube_clear();
for (uint8_t i = 0; i < 10; i++){
move_x_rev(0,0,7,7);
_delay_ms(300);
Upload to Download
cube[3][7] |= WAVES_DEPTH;
_delay_ms(300);
cube_show_loop(WAVES_DELAY);
_delay_ms(300);
move_x_rev(0,0,7,7);
_delay_ms(300);
cube[2][7] |= WAVES_DEPTH;
_delay_ms(300); OR
cube_show_loop(WAVES_DELAY);
_delay_ms(300);
move_x_rev(0,0,7,7);
move_x_rev(0,0,7,7);
_delay_ms(300);
cube[2][7] |= WAVES_DEPTH;
Upload to Download
move_x_rev(0,0,7,7);
_delay_ms(300);
cube[4][7] |= WAVES_DEPTH;
_delay_ms(300);
cube_show_loop(WAVES_DELAY);
_delay_ms(300);
move_x_rev(0,0,7,7);
_delay_ms(300); OR
cube[5][7] |= WAVES_DEPTH;
_delay_ms(300);
cube_show_loop(WAVES_DELAY);
cube_show_loop(WAVES_DELAY);
_delay_ms(300);
move_x_rev(0,0,7,7);
Upload to Download
cube_show_loop(WAVES_DELAY);
_delay_ms(300);
}
}
cube_clear();
for (uint8_t layer = 0; layer < sonic_layers; layer++){
cube[layer][0] = 0b01000000;
cube[layer][1] = 0b10000000;
}
for (uint8_t deg = 0; deg < mode; deg++){
rotate_90_deg();
}
cube_show_loop_wo_int(SONIC_DELAY);
cube_clear();
for (uint8_t layer = 0; layer < sonic_layers; layer++){
cube[layer][0] = 0b00100000;
cube_show_loop_wo_int(SONIC_DELAY);
cube_clear();
Upload to Download
for (uint8_t layer = 0; layer < sonic_layers; layer++){
cube[layer][0] = 0b00010000;
cube[layer][1] = 0b00010000;
cube[layer][2] = 0b00100000;
cube[layer][3] = 0b11000000;
}
OR
for (uint8_t deg = 0; deg < mode; deg++){
rotate_90_deg();
}
cube_show_loop_wo_int(SONIC_DELAY);
cube_clear();
for (uint8_t layer = 0; layer < sonic_layers; layer++){
cube[layer][0] = 0b00000100;
cube[layer][1] = 0b00000100;
cube[layer][2] = 0b00000100;
cube[layer][3] = 0b00001000;
cube[layer][4] = 0b00010000;
cube[layer][5] = 0b11100000;
}
for (uint8_t deg = 0; deg < mode; deg++){
rotate_90_deg();
}
cube_show_loop_wo_int(SONIC_DELAY);
Upload to Download
}
cube[layer][6] = 0b11100000;
cube_clear(); OR
for (uint8_t layer = 0; layer < sonic_layers; layer++){
cube[layer][0] = 0b00000001;
cube[layer][1] = 0b00000001;
cube_clear();
for (uint8_t layer = 0; layer < sonic_layers; layer++){
cube[layer][4] = 0b00000001;
cube[layer][5] = 0b00000010;
cube[layer][6] = 0b00000100;
cube[layer][7] = 0b00001000;
}
for (uint8_t deg = 0; deg < mode; deg++){
rotate_90_deg();
}
cube_show_loop_wo_int(SONIC_DELAY);
cube_clear();
for (uint8_t layer = 0; layer < sonic_layers; layer++){
cube_show_loop_wo_int(SONIC_DELAY);
cube_clear();
Upload to Download
for (uint8_t layer = 0; layer < sonic_layers; layer++){
cube[layer][7] = 0b00000001;
}
for (uint8_t deg = 0; deg < mode; deg++){
rotate_90_deg();
}
} else { OR
cube_show_loop_wo_int(SONIC_DELAY);
/* center wave */
cube_clear();
for (uint8_t layer = 0; layer < sonic_layers; layer++){
Upload to Download
for (uint8_t layer = 0; layer < sonic_layers; layer++){
cube[layer][0] = 0b01000010;
cube[layer][1] = 0b10000001;
cube[layer][6] = 0b10000001;
cube[layer][7] = 0b01000010;
}
OR
cube_show_loop_wo_int(SONIC_DELAY);
cube_clear();
for (uint8_t layer = 0; layer < sonic_layers; layer++){
cube[layer][0] = 0b10000001;
cube[layer][7] = 0b10000001;
cube_show_loop(BLOCK_WIPE_DELAY);
_delay_ms(100);
}
cube_show_loop(BLOCK_WIPE_DELAY);
_delay_ms(100);
}
} Upload to Download
void cube_belt_wipe( void )
{
for (uint8_t layer = 8; layer != 0; layer--){
cube[layer-1][0] |= 0xFF;
cube[layer-1][7] |= 0xFF; OR
for (uint8_t i = 1; i < 7; i++){ cube[layer-1][i] |= 0b10000001; }
cube_show_loop(BELT_WIPE_DELAY);
}
}
}
documents.
_delay_ms(BLINK_DELAY*5);
_delay_ms(BLINK_DELAY*5);
}
}
You're Reading a Preview
Upload your documents to download.
TRANSLATION
Upload to Download
#include <stdlib.h>
#include <avr/io.h>
#include <inttypes.h>
#include <util/delay.h>
#include <math.h>
#include "ab.h"
OR
#include "rotation.h"
#include "ledcube.h"
#include "translation.h"
Become
voida
{
Scribd(uint8_t
move_z_fwd member touint8_t
x1, uint8_t y1, read and
x2, uint8_t y2 )download full
}
} Start your 30 day free trial
void move_z_rev ( uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2 )
{
for (; x1 <= x2; x1++){
for (uint8_t i= y1; i <= y2; i++){
cube[x1][i] = (cube[x1][i] >> 1);
}
}
}
}
}
Upload to Download
}
Start
} your 30 day free trial
}
}
}
Upload your documents to download.
void move_x_rev( uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2 )
{
Upload to Download
for (uint8_t j = 0; j < 7; j++){
for (uint8_t k = x1; k <= x2; k++) {
if ((cube[layer][j+1] & (1 << k))){
cube[layer][j] |= (1 << k);
cube[layer][j+1] &= ~(1 << k);
} else {
} OR
cube[layer][j] &= ~(1 << k);
Become
} a Scribd member to read and download full
}
ROTATION
documents.
Upload to Download
void rotate_90_deg ( void )
{
uint8_t cube_org[8][8];
for (uint8_t i = 0; i < 8; i++){
for (uint8_t j = 0; j < 8; j++){
cube_org[i][j] = cube[i][j];
}
}
OR
cube_clear();
for ( uint8_t layer = 0; layer < 8; layer++ ) {
for ( uint8_t x = 0; x < 8; x++) {
}
}
documents.
}
}
#include "ledcube.h"
#include <stdlib.h>
#include <avr/io.h>
#include <inttypes.h>
#include <util/delay.h>
#include <math.h>
#include <avr/interrupt.h>
#include "ab.h"
#include "rotation.h"
ISR( TIMER0_OVF_vect )
{
TCNT0 = 0xB0; Upload to Download
PORTC = 0x0;
static uint8_t cube_show_layer = 0;
asm volatile("nop");
asm volatile("nop");
asm volatile("nop");
asm volatile("nop"); OR
asm volatile("nop");
for(uint8_t j = 0; j < 8; j++){
PORTD = cube[cube_show_layer][j];
}
cube[layer][j] = 0;
}
Upload your documents to download.
void cube_full ( void )
{
for (uint8_t i = 0; i < 8; i++){
for (uint8_t j = 0; j < 8; j++){
} Upload to Download
cube[i][j] = 255;
}
}
void cube_cube_3 ( void )
{
cube[0][0] = 7;
cube[0][1] = 7; OR
cube[0][2] = 7;
cube[1][0] = 7;
cube[1][1] = 7;
}
cube[2][2] = 7;
documents.
void cube_cube_4_line ( void )
{
Start your 30 day free trial
cube[0][0] = 15;
cube[0][1] = 9;
cube[0][2] = 9;
cube[0][3] = 15;
cube[1][0] = 9;
cube[1][3] = 9;
cube[2][0] = 9;
cube[2][3] = 9;
cube[3][0] = 15;
cube[3][1] = 9;
cube[3][2] = 9;
cube[3][3] = 15;
}
cube[i][j] = rand()%255;
}
Upload your documents to download.
}
Upload to Download
for (uint8_t j = 0; j < 8; j++){
cube[i][j] = 1;
}
}
}
asm volatile("nop");
for (uint8_t i = 0; i < 8; i++){
for(uint8_t j = 0; j < 8; j++){
PORTD = cube[i][j];
asm volatile("nop");
PORTA |= (1 << j);
asm volatile("nop");
PORTA = 0;
asm volatile("nop");
}
PORTC |= (1 << i);
_delay_ms(1);
PORTC = 0x00;
asm volatile("nop");
Upload to Download
for (uint16_t i = 0; i < cycle*2; i++){
_delay_ms(8);
}
}
MA I N
documents.
void init(void)
{
PORTC = 0;
DDRC = 0xFF;
DDRA = 0xFF;
DDRD = 0xFF;
PORTA = 0;
PORTD = 0;
int main(void)
{
init();
_delay_ms(100);
_delay_ms(100); Upload to Download
cube_clear(); /* never forget this */
while ( 1 ){
cube_explosion();
cube_string_to_front("fisat");
cube_belt_wipe(); OR
cube_fixed_string();
cube_block_wipe();
cube_2_auto();
}
}
81 pages
11 pages
19 pages
10 pages
PDF 0% (1)
"3D Led Cube": Project Synopsis Bachler of
Engineering Electrical Engineering (7 Sem.)
Krishna Engineering College, Bhilai
5 pages
16 pages
41 pages
42 pages
11 pages
19 pages
49 pages
24 pages
Show more
About Support
About Scribd, Inc. Help / FAQ
Contact us Social
Instagram
Legal
Facebook
Terms
Pinterest
Privacy
Copyright
Cookie Preferences
Documents
Language: English
We and our 10 IAB TCF partners store and access information on
Copyright © 2025 Scribd Inc.
your device for the following purposes: store and/or access
information on a device, advertising and content measurement,
audience research, and services development, personalised
advertising, and personalised content. Personal data may be
processed to do the following: use precise geolocation data
and actively scan device characteristics for identification. Our
third party IAB TCF partners may store and access information
on your device such as IP address and device characteristics.
Our IAB TCF Partners may process this personal data on the
basis of legitimate interest, or with your consent. You may
change or withdraw your preferences at any time by clicking on
the cookie icon or link; however, as a consequence, you may not
see relevant ads or personalized content.
Our website may use these cookies to:
Measure the audience of the advertising on our
website, without profiling
Display personalized ads based on your navigation and
your profile
Personalize our editorial content based on your
navigation
Allow you to share content on social networks or
platforms present on our website
Send you advertising based on your location
Privacy Policy
Third Parties
Accept All
Ad
Continue Without Accepting