0% found this document useful (0 votes)
28 views1 page

WWW Scribd

The document is a mini project report on the 3D LED Cube Display (8x8x8 Pixels) submitted by students from the Department of Electronics & Communication Engineering at FISAT. It details the project's objectives, design, and implementation, including the use of an ATMEGA32 microcontroller to control the LED patterns displayed in three dimensions. The report also includes acknowledgments, circuit diagrams, and explanations of the hardware and software components used in the project.

Uploaded by

kjeeva071213
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views1 page

WWW Scribd

The document is a mini project report on the 3D LED Cube Display (8x8x8 Pixels) submitted by students from the Department of Electronics & Communication Engineering at FISAT. It details the project's objectives, design, and implementation, including the use of an ATMEGA32 microcontroller to control the LED patterns displayed in three dimensions. The report also includes acknowledgments, circuit diagrams, and explanations of the hardware and software components used in the project.

Uploaded by

kjeeva071213
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Search

0% (2) · 5K views · 92 pages


Mini Project Report (Topic - 3D
LED CUBE DISPLAY (8x8x8
Pixels) )
Uploaded by bineeshbhasi
AI-enhanced title

Document Information
3D LED CUBE DISPLAY (

Download
Download as pdf or txt

3D LED CUBE DISPLAY (8x8x8 PIXELS)

Mini Project Report

Submitted by

RANDEEP KUMAR
SHARUK K.A
UNNI V.S
VISHNU PRASAD C.V

Focus on Excellence

Department of Electronics & Communication Engineering



FEDERAL INSTITUTE OF SCIENCE AND TECHNOLOGY (FISAT)
Angamaly-683577, Ernakulam

Affiliated to

MAHATMA GANDHI UNIVERSITY


Kottayam-686560

May 2011

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

You're Reading aReport


Mini Project Preview
Submitted by

Upload your documents to download.


RANDEEP KUMAR
SHARUK K.A
UNNI V.S
UploadVISHNU
to Download
PRASAD C.V

In partial fulfillment of the requirements for award of the degree of Bachelor of


Technology
OR
in Electronics & Communication Engineering

Become a Scribd member to read and download full


documents.

Start your Focus


30 day free trial
on Excellence

Department of Electronics & Communication Engineering



FEDERAL INSTITUTE OF SCIENCE AND TECHNOLOGY (FISAT)
Angamaly-683577, Ernakulam

Affiliated to

MAHATMA GANDHI UNIVERSITY


Kottayam-686560

May 2011

Ad Download to read ad-free


FEDERAL INSTITUTE OF SCIENCE AND TECHNOLOGY (FISAT)
Mookkannoor (P.O), Angamaly-683577

You're Reading a Preview


Upload your documents to download.

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:

Internal Examiner: External Examiner

Ad Download to read ad-free

ACKNOWLEDGEMENT

You're Reading a Preview


We express our deep sense of gratitude to our principal Dr. K.V Sundaresan who
extended all resources for the successful completion of our project. Mrs. P.R Mini our
HOD’s well wishes, whole hearted co-operation and contribution one form or another has
Upload your documents to download.
helped us throughout this venture.

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

Become a Scribd member to read and download full


the divine grace, our dream project wouldn’t have materialized.

documents.

Start your 30 day free trial

Ad Download to read ad-free

ABSTRACT

You're Reading a Preview


The project is a 3D LED CUBE DISPLAY (8x8x8 PIXELS) which displays different
patterns stored in the microcontroller . This LED cube is like a LED screen, but it is special
in that it has a third dimension, making it 3D. Think of it as many transparent low
Upload your documents to download.
resolution displays. In normal displays it is normal to try to stack the pixels as close as
possible in order to make it look better, but in a cube one must be able to see through it,
and more spacing between the pixels (actually it's voxels since it is in 3d) is needed. The

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

Start your 30 day free trial


provided externally. This unique way of displaying messages is a very eye catching;
therefore its uses can in the field of advertising, toys, etc………

Ad Download to read ad-free

CONTENTS

You're Reading a Preview


Page No

Upload your documents to download.


Chapter 1 INTRODUCTION 1

Chapter 2 Upload to Download


BLOCK DIAGRAM AND EXPLANATION 2

2.1 Block diagram 2


2.2 Explanation 3

Chapter 3
OR
CIRCUIT DIAGRAMS AND EXPLANATION 5

3.1 Circuit Diagrams 6

Become a Scribd member to read


3.1.1 Schematic andBoard
Controller download full
6
3.1.2 Wiring 3x3x3 LED Cube 7
documents.
3.2 Explanation 8

Chapter 4 Start your 30 day free trial


PCB 10

4.1 PCB Component Layout 10


4.2 Jumper Layer 11
4.3 Soldering Layer 12
4.4 PCB Fabrication 13

Chapter 5 HARDWARE AND SOFTWARE SECTION 15

5.1 Hardware section 15


5.2 Software platforms used 16
5.3 Flow chart 19

Ad Download to read ad-free

Chapter 6 RESULTS 21

You're Reading a Preview


Chapter 7 CONCLUSION & FUTURE SCOPE 22

Components List 23

Upload your documents


References to download. 24

Appendix 25

Upload to Download

OR

Become a Scribd member to read and download full


documents.

Start your 30 day free trial

Ad Download to read ad-free

You're Reading a Preview


Upload your documents to download.

Upload to Download

OR

Become a Scribd member to read and download full


documents.

Start your 30 day free trial


1. I NTRODUCTI ON

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

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 your documents to download.


common like the CPU (central processing unit), execution of programs, presence of RAM
(random-access memory) etc… Microcontrollers are “special purpose computers”.

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.

Electronics & Communication Engineering, FISAT 1

Ad Download to read ad-free

You're Reading a Preview


Upload your documents to download.

Upload to Download

OR

Become a Scribd member to read and download full


documents.

Start your 30 day free trial


2. B L OCK D I AG R AM AND E XPL ANATI ON

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

You're Reading a Preview


2. BLOCK DIAGRAM AND EXPLANATION

2.1 Block Diagram


Upload your documents to download.

Upload to Download
230 V, 50 Hz AC Supply

OR

Become a Scribd member to read and download full


documents.

Start your 30 day free trial

Fig 2.1 Block Diagram

Electronics & Communication Engineering, FISAT 2

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

You're Reading a Preview


2.2 Explanation

Upload your documents to download.


2.2.1 Power Supply

Power supply is used to provide a +5 volt, 2A from 230V 50Hz ac supply


with the use of bridge rectifier and regulator.

Upload to Download
2.2.2 Microcontroller

Microcontroller ATMEGA32 is used to control the D latch and MOSFET.

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)

Start your 30 day free trial


IRFZ44 is an N-channel (MOSFET) enhancement mode standard level field-
effect power transistor in a plastic envelope using ‟trench‟ technology. The device
features very low on-state resistance and has integral zener diodes giving ESD
protection up to 2kV. It is intended for use in switched mode power supplies and
general purpose switching applications.

2.2.4 D Latch (74HC573)

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

Electronics & Communication Engineering, FISAT 3

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

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

You're Reading a Preview


to all latches.

Upload your documents to download.


2.2.5 3d Led Cube Structure

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.

Become a Scribd member to read and download full


documents.

Start your 30 day free trial

Electronics & Communication Engineering, FISAT 4

Ad Download to read ad-free

You're Reading a Preview


Upload your documents to download.

Upload to Download

OR

Become a Scribd member to read and download full


documents.

Start your 30 day free trial


3. CI R CUI T DI AG R AMS AND E XP L ANATI ON

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

You're Reading a Preview


3. CIRCUIT DIAGRAMS AND EXPLANATION

3.1 Circuit Diagrams

Upload your documents to download.


3.1.1 schematic controller board

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

R40 – R47, R50 – R57, R60 – R67 20 Ω

R70 – R77, R80 – R87

X (Crystal Oscillator) 16MHz

C1, C3 22PF

C2 10PF

Electronics & Communication Engineering, FISAT 5

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

You're Reading a Preview


Upload your documents to download.

Upload to Download

OR

Become a Scribd member to read and download full


documents.

Start your 30 day free trial

Fig 3.1
schematic
controller board

Electronics & Communication Engineering, FISAT 6

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

3.1.2 Wiring 3x3x3 LED Cube

You're Reading a Preview


Upload your documents to download.

Upload to Download

OR

Become a Scribd member to read and download full


documents.

Start your 30 day free trial

Fig 3.2 wiring


3x3x3 led cube

Electronics & Communication Engineering, FISAT 7

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

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

Upload your documents to download.


3D. Think of it as many transparent low resolution displays. In normal displays it is normal
to try to stack the pixels as close as possible in order to make it look better, but in a cube
one must be able to see trough it, and more spacing between the pixels (actually it's voxels
since it is in 3d) is needed. The spacing is a trade-off between how easy the layers behind it
Upload to Download
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 in low resolution. A LED cube does not have to be
OR
symmetrical; it is possible to make a 7x8x9, or even oddly shaped ones.

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

Start your 30 day free trial


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, there exists the need of only 64 (for the anodes) + 8 (for each
layer) IO ports to control the LED cube. There are anodes, cathodes, columns and layers,
for this led cube.

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

Electronics & Communication Engineering, FISAT 8

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

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

You're Reading a Preview


the flow of current through each layer. By only turning on the transistor for one layer,
current from the anode columns can only flow through that layer. The transistors for the
other layers are off, and the image outputted on the 64 anode wires are only shown on the
Upload your documents to download.
selected layer. To display the next layer, simply turn off the transistor for the current layer,
change the image on the 64 anode wires to the image for the next layer. Then turn on the
transistor for the next layer. Rinse and repeat very fast.

The layers will


Upload to Download
be referred to as layers, cathode layers or ground layers.
The columns will be referred to as columns, anode columns or anodes.

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 .

Start your 30 day free trial

Electronics & Communication Engineering, FISAT 9

Ad Download to read ad-free

You're Reading a Preview


Upload your documents to download.

Upload to Download

OR

Become a Scribd member to read and download full


documents.

Start your 30 day free trial


4. PCB

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

4. PCB
You're Reading a Preview
4.1 PCB Component Layout
Upload your documents to download.

Upload to Download

OR

Become a Scribd member to read and download full


documents.

Start your 30 day free trial

Fig 4.1 component layout

Electronics & Communication Engineering, FISAT 10

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

You're Reading a Preview


4.2 Jumper Layer

Upload your documents to download.

Upload to Download

OR

Become a Scribd member to read and download full


documents.

Start your 30 day free trial

Fig 4.2 jumper layer

Electronics & Communication Engineering, FISAT 11

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

You're Reading a Preview


4.3 Soldering Layer

Upload your documents to download.

Upload to Download

OR

Become a Scribd member to read and download full


documents.

Start your 30 day free trial

Fig 4.3 Soldering layer

Electronics & Communication Engineering, FISAT 12

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

You're Reading a Preview


4.4 PCB Fabrication

A printed circuit board, or PCB, is used to mechanically support and electrically connect

Upload your documents to download.


electronic components using conductive pathways, tracks or traces etched from copper
sheets laminated onto a non-conductive substrate. It is also referred to as printed wiring
board (PWB) or etched wiring board. A PCB populated with electronic components is a

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

Start your 30 day free trial


with a solder mask that is green in color. Other colors that are normally available are blue
and red. There are quite a few different dielectrics that can be chosen to provide different
insulating values depending on the requirements of the circuit. Some of these dielectrics are
polytetrafluroethylene (Teflon), FR-4, FR-1, CEM-1 or CEM-3. Well known prepreg
materials used in the PCB industry are FR-2 (Phenolic cotton paper), FR-3 (Cotton paper
and epoxy), FR-4 (Woven glass and epoxy), FR-5 (Woven glass and epoxy), FR-6 (Matte
glass and polyester), G-10 (Woven glass and epoxy), CEM-1 (Cotton paper and epoxy),
CEM-2 (Cotton paper and epoxy) CEM-3 (Woven glass and epoxy), CEM-4 (Woven glass
and epoxy), CEM-5 (Woven glass and polyester). Thermal expansion is an important
consideration especially with BGA and naked die technologies, and glass fiber offers the
best dimensional stability.

Electronics & Communication Engineering, FISAT 13

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

4.4.2 patterning (etching)

You're Reading a Preview


The vast majority of printed circuit boards are made by bonding a layer of copper over the
entire substrate, sometimes on both sides, (creating a “blank PCB”) then removing

Upload your documents to download.


unwanted copper after applying a temporary mask (e.g. by etching), leaving only the
desired copper traces. A few PCB‟s are made by adding traces to the substrate (or a
substrate with a very thin layer of copper) usually by a complex process of multiple

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

Become a Scribd member to read and download full


hybrid circuits.

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.

Start your 30 day free trial


3. PCB milling uses a two or three-axis mechanical milling system to mill away the copper
foil from the substrate. A PCB milling machine (referred to as a „PCB Prototype) operates
in a similar way to a plotter of the milling head in the x, y, and (if relevant z axis). Data to
drive the Prototypes is extracted from files generated in PCB design software and stored in
HPGL or Gerber file format.

Electronics & Communication Engineering, FISAT 14

Ad Download to read ad-free

You're Reading a Preview


Upload your documents to download.

Upload to Download

OR

Become a Scribd member to read and download full


documents.

Start your 30 day free trial


5. H AR DWA R E AND SOF TWA R E SE CTI ON

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

You're Reading a Preview


5. HARDWARE AND SOFTWARE SECTION

5.1 Hardware Section


Upload your documents to download.
5.1.1 isp programmer

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

Become a Scribd member to read and download full


documents.

Start your 30 day free trial

Fig 5.1 serial


programmer

Electronics & Communication Engineering, FISAT 15

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

You're Reading a Preview


5.2 Software Platforms Used

5.2.1 avr studio

Upload your documents to download.


AVR Studio is used by embedded programmers for programming and debugging for many
of the Atmel microprocessors such as the Atmega8 or even the Atmega128. While it has
support for assembly programming for those who prefer to use higher languages, it uses the
Upload to Download
coff format for debugging. Beginning with version 4 AVR Studio has now moved to
dwarf2, and can be more readily used in conjunction with the open source gcc based
compiler WinAVR.

OR

Become a Scribd member to read and download full


documents.

Start your 30 day free trial

Fig 5.2 AVR studio

Electronics & Communication Engineering, FISAT 16

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

You're Reading a Preview


5.2.2 pony prog 2000

Pony Prog is a serial device programmer software with a user-friendly GUI frame work

Upload your documents to download.


available for Windows95, 98, 2000 & NT and Intel Linux. Its purpose is reading and
writing every serial device. At the moment it supports I²C Bus, Micro wire, SPI EEPROM,
the Atmel AVR and Microchip PIC micro.

Upload to Download

OR

Become a Scribd member to read and download full


documents.

Start your 30 day free trial

Fig 5.3 pony prog

Electronics & Communication Engineering, FISAT 17

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

You're Reading a Preview


Upload your documents to download.

Upload to Download

Fig 5.4 connections


for programming OR

Become a Scribd member to read and download full


documents.

Start your 30 day free trial

Fig 5.5 pin out of


ATMEGA32

Electronics & Communication Engineering, FISAT 18

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

5.3 Flow Chart


You're Reading a Preview START

Upload your documents to download.


Port Configurations

Upload to Download
Initialization

OR

Become a Scribd member to read and download full


While (1)

documents.YES
Call the
Start your 30 function
day
cube
free trial
explosion ()

Display
String
“FISAT”

A B

Electronics & Communication Engineering, FISAT 19

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

You're Reading a Preview Call Block


wipe ()

Upload your documents


Rotate to download.
string
“3D”

Upload toCallDownload
functions
block wipe (),
cube_2_auto (),
cube_wipe (),
cube_waves (),
OR
cube_explosion (),
cube_stripes ()

Become a Scribd member to read and download full


Call functions
cube_belt_wipe();
outline_shrink();
documents.
cube_explosion();
cubes_4();
cubes_4();
cube_belt_wipe();
Start your 30 day free trial
cube_outline();
cube_explosion();
cube_stars();
cube_explosion();
cube_sonic();
cube_belt_wipe();
cube_string_belt("
.thank you");

Electronics & Communication Engineering, FISAT 20

Ad Download to read ad-free

You're Reading a Preview


Upload your documents to download.

Upload to Download

OR

Become a Scribd member to read and download full


documents.

Start your 30 day free trial


6. RE SULTS

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

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

Become a Scribd member to read and download full


documents.

Start your 30 day free trial

Electronics & Communication Engineering, FISAT 21

Ad Download to read ad-free

You're Reading a Preview


Upload your documents to download.

Upload to Download

OR

Become a Scribd member to read and download full


documents.

Start your 30 day free trial


7. CONCLUSI ON & F UTURE SCOPE

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

7. CONCLUSION & FUTURE SCOPE

You're Reading a Preview


We were successful in completing our mini project “3D LED CUBE DISPLAY (8x8x8

Upload your documents to download.


Pixels)”. It was a wonderful experience as we attained basic knowledge on different steps in
circuit manufacturing such as circuit testing and debugging, soldering components, PCB
fabrication etc that will surely help us in our career in electronics field. By doing this

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………

Become a Scribd member to read and download full


documents.

Start your 30 day free trial

Electronics & Communication Engineering, FISAT 22

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

Table 1: Components List


You're Reading a Preview
Upload your documents to download.
SL.NO: COMPONENT SPECIFICATION QUANTITY
1 LED‟S BLUE COLOR, 512
DOM TYPE
2 RESISTORS 20 Ω, 1KΩ, 10KΩ, 64, 8, 2, 3, 3
22KΩ, 4.7KΩ

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

7 CAPACITORS 22PF, .01µF 5, 5

Become a Scribd
8 member
TRANSISTORto readBC547
and download
1 full
9
documents.
CRYSTAL
OSCILLATOR
16MHz 1

10 POWER SUPPLY 5V, 2A 1

11 SERIAL CABLE AND FOR 1


Start your 30 day free trial
4PIN FEMALE PIN
HEADER
PROGRAMMING

12 STAINLESS STEEL FOR THE 1.25 KG


RODS STRUCTURE

13 8 PIN CONNECTORS WITH JACK 18

14 HEAT SINKS WING TYPE 8

15 MISCELLANEOUS - -

Electronics & Communication Engineering, FISAT 23

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

You're Reading a Preview


References

Upload your documents to download.


[1] (2010, Aug). Atmel: ATMEGA32 DATASHEET [Online].

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)

[3] (2000, Sep).

[4] (2005-2010).

[5] (2005-2010). OR

Become a Scribd member to read and download full


documents.

Start your 30 day free trial

Electronics & Communication Engineering, FISAT 24

Ad Download to read ad-free

You're Reading a Preview


Upload your documents to download.

Upload to Download

OR

Become a Scribd member to read and download full


documents.

Start your 30 day free trial


APP E NDI X

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

You're Reading a Preview


3D LED CUBE DISPLAY (8x8x8 PIXELS)

Upload your documents to download.

Upload to Download

OR

Become a Scribd member to read and download full


documents.

Start your 30 day free trial

Electronics & Communication Engineering, FISAT 25

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

You're Reading a Preview


Program

Upload your documents to download.


Header Files

AB
Upload to Download
#ifndef AB_H
#define AB_H

#include <inttypes.h>

void cube_char( char ch, uint8_t z );


OR
#endif

Become a Scribd member to read and download full


AN I MAT I ONS

#ifndef ANIMATIONS_H
documents.
#define ANIMATIONS_H

Start your 30 day free trial


#include <stdlib.h>
#include <avr/io.h>
#include <inttypes.h>

void cube_string_belt(char *string);


void set_char_to_belt(char character, char *belt);
void move_belt_left(char *belt);

#define SHOW_BELT_DELAY 50
void show_belt(char *belt);

void cube_string_to_front(char *string);

void cube_fixed_string( void );

Electronics & Communication Engineering, FISAT 26

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

#define CUBE_AUTO_DELAY 60
void cube_2_auto( void );

You're Reading a Preview


void cube_2_auto_show( char cube2[4][4] );

uint8_t cube2_move_y_fwd( char cube2[4][4], uint8_t y, uint8_t x, uint8_t z );


uint8_t cube2_move_y_rev( char cube2[4][4], uint8_t y, uint8_t x, uint8_t z );
Upload your documents to download.
uint8_t cube2_move_x_fwd( char cube2[4][4], uint8_t y, uint8_t x, uint8_t z );
uint8_t cube2_move_x_rev( char cube2[4][4], uint8_t y, uint8_t x, uint8_t z );
uint8_t cube2_move_z_fwd( char cube2[4][4], uint8_t y, uint8_t x, uint8_t z );
uint8_t cube2_move_z_rev( char cube2[4][4], uint8_t y, uint8_t x, uint8_t z );

void cube_diamond( void );


Upload to Download
#define CUBES2_DELAY 15
void cubes_2( void );
#define CUBES4_DELAY 50
void cubes_4( void );

#define STRIPES_DELAY 60 OR
void cube_stripes( void );

#define OUT_SHRINK_DELAY 140

Become a Scribd member to read and download full


void outline_shrink( void );

#define EXPLOSION_DELAY 10
documents.
void cube_explosion( void );

#define SWIPE_DELAY 60
void cube_wipe( void );

Start your 30 day free trial


#define BLINK_DELAY 3
void cube_flash( uint8_t cycle );

#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 );

Electronics & Communication Engineering, FISAT 27

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

#define STARS_DELAY 40
void cube_stars( void );

You're Reading a Preview


#define BLOCK_WIPE_DELAY 50
void cube_block_wipe( void );

Upload your documents to download.


#define BELT_WIPE_DELAY 50
void cube_belt_wipe( void );
#endif

LEDCUBE Upload to Download


#ifndef LEDCUBE_H
#define LEDCUBE_H

#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 );

void cube_clear ( void ); documents.


void cube_clear_layer(uint8_t layer);
void cube_full ( void );

Start your 30 day free trial


void cube_cube_3 ( void );
void cube_cube_4_line ( void );
void cube_random( void );
void cube_test_z( void );
void cube_test_y( void );
void cube_test_x( void );

void cube_show( void );


void cube_show_loop( uint8_t cycle );
void cube_show_loop_wo_int( uint8_t cycle );
#endif

TRANSLATION

Electronics & Communication Engineering, FISAT 28

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

#ifndef TRANSLATION_H
#define TRANSLATION_H

You're Reading a Preview


#include <stdlib.h>
#include <avr/io.h>
#include <inttypes.h>

Upload your documents to download.


void move_z_fwd ( uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2 );
void move_z_rev ( uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2 );
void move_y_fwd( uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2 );
void move_y_rev( uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2 );
void move_x_fwd( uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2 );

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 );

Start your 30 day free trial


void rotate_15_deg( void );
void rotate_30_deg( void );
void rotate_45_deg( void );
void rotate_60_deg( void );
void rotate_75_deg( void );
void rotate_90_deg( void );

#endif

Electronics & Communication Engineering, FISAT 29

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

Source Files

You're Reading a Preview


AB

Upload your documents to download.


#include "ledcube.h"
#include <stdlib.h>

Upload to Download
#include <inttypes.h>
#include <math.h>
#include "ab.h"

void cube_char( char ch, uint8_t z )

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;

Electronics & Communication Engineering, FISAT 30

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

cube[1][3] |= z;
cube[2][3] |= z;
cube[3][3] |= z;

You're Reading a Previewcube[4][3] |= z;


cube[5][2] |= z;
cube[5][3] |= z;
cube[6][3] |= z;
Upload your documents to download.
case '2':
break;

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;

Become a Scribd member to read and download full


break;
case '3':
cube[0][2] |= z;
documents. cube[0][3] |= z;
cube[0][4] |= z;
cube[1][1] |= z;
cube[1][5] |= z;

Start your 30 day free trial


cube[2][5] |= z;
cube[3][4] |= z;
cube[4][3] |= z;
cube[5][4] |= z;
cube[6][1] |= z;
cube[6][2] |= z;
cube[6][3] |= z;
cube[6][4] |= z;
cube[6][5] |= z;
break;
case '4':
cube[0][4] |= z;
cube[1][4] |= z;
cube[2][1] |= z;
cube[2][2] |= z;
cube[2][3] |= z;

Electronics & Communication Engineering, FISAT 31

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

cube[2][4] |= z;
cube[2][5] |= z;
cube[3][1] |= z;

You're Reading a Previewcube[3][4] |= z;


cube[4][2] |= z;
cube[4][4] |= z;
cube[5][3] |= z;
Upload your documents to download.
cube[5][4] |= z;
cube[6][4] |= z;
break;
case '5':
cube[0][2] |= 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;

Become a Scribd member to read and download full


cube[6][1] |= z;
cube[6][2] |= z;
cube[6][3] |= z;
documents. cube[6][4] |= z;
cube[6][5] |= z;
break;
case '6':

Start your 30 day free trial


cube[0][2] |= z;
cube[0][3] |= z;
cube[0][4] |= z;
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;
cube[4][1] |= z;
cube[5][2] |= z;
cube[6][3] |= z;
cube[6][4] |= z;
break;

Electronics & Communication Engineering, FISAT 32

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

case '7':
cube[0][2] |= z;
cube[1][2] |= z;

You're Reading a Previewcube[2][2] |= z;


cube[3][3] |= z;
cube[4][4] |= z;
cube[5][5] |= z;
Upload your documents to download.
cube[6][1] |= z;
cube[6][2] |= z;
cube[6][3] |= z;
cube[6][4] |= z;
cube[6][5] |= 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;

Become a Scribd member to read and download full


cube[3][4] |= z;
cube[4][1] |= z;
cube[4][5] |= z;
documents. cube[5][1] |= z;
cube[5][5] |= z;
cube[6][2] |= z;
cube[6][3] |= z;

Start your 30 day free trial


cube[6][4] |= z;
break;
case '9':
cube[0][2] |= z;
cube[0][3] |= z;
cube[1][4] |= z;
cube[2][5] |= z;
cube[3][2] |= z;
cube[3][3] |= z;
cube[3][4] |= z;
cube[3][5] |= z;
cube[4][1] |= z;
cube[4][5] |= z;
cube[5][1] |= z;
cube[5][5] |= z;
cube[6][2] |= z;

Electronics & Communication Engineering, FISAT 33

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

cube[6][3] |= z;
cube[6][4] |= z;
break;

You're Reading a Preview


case '!':
cube[0][3] |= z;
cube[3][3] |= z;
Upload your documents to download.
cube[4][3] |= z;
cube[5][2] |= z;
cube[5][3] |= z;
cube[5][4] |= z;
cube[6][1] |= z;

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;

Become a Scribd member to read and download full


cube[4][3] |= z;
cube[5][2] |= z;
cube[5][3] |= z;

case '.':
documents. break;

cube[1][2] |= z;
cube[1][3] |= z;

Start your 30 day free trial


cube[2][2] |= z;
cube[2][3] |= z;
break;
case '?':
cube[0][3] |= z;
cube[2][3] |= z;
cube[3][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 '&':
cube[0][2] |= z;

Electronics & Communication Engineering, FISAT 34

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

cube[0][3] |= z;
cube[0][5] |= z;
cube[1][1] |= z;

You're Reading a Previewcube[1][4] |= z;


cube[2][1] |= z;
cube[2][3] |= z;
cube[2][5] |= z;
Upload your documents to download.
cube[3][2] |= z;
cube[4][1] |= z;
cube[4][3] |= z;
cube[5][1] |= z;
cube[5][4] |= 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;

Become a Scribd member to read and download full


cube[2][4] |= z;
cube[2][5] |= z;
cube[3][1] |= z;
documents. cube[3][5] |= z;
cube[4][1] |= z;
cube[4][5] |= z;
cube[5][1] |= z;

Start your 30 day free trial


cube[5][5] |= z;
cube[6][2] |= z;
cube[6][3] |= z;
cube[6][4] |= z;
break;
case 'b':
cube[0][1] |= z;
cube[0][2] |= z;
cube[0][3] |= z;
cube[0][4] |= z;
cube[1][1] |= z;
cube[1][5] |= z;
cube[2][1] |= z;
cube[2][5] |= z;
cube[3][1] |= z;
cube[3][2] |= z;

Electronics & Communication Engineering, FISAT 35

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

cube[3][3] |= z;
cube[3][4] |= z;
cube[4][1] |= z;

You're Reading a Previewcube[4][5] |= z;


cube[5][1] |= z;
cube[5][5] |= z;
cube[6][1] |= z;
Upload your documents to download.
cube[6][2] |= z;
cube[6][3] |= z;
cube[6][4] |= z;
break;
case 'c':

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;

Become a Scribd member to read and download full


cube[6][2] |= z;
cube[6][3] |= z;
cube[6][4] |= z;
documents. case 'd':
break;

cube[0][1] |= z;
cube[0][2] |= z;

Start your 30 day free trial


cube[0][3] |= z;
cube[1][1] |= z;
cube[1][4] |= z;
cube[2][1] |= z;
cube[2][5] |= z;
cube[3][1] |= z;
cube[3][5] |= z;
cube[4][1] |= z;
cube[4][5] |= z;
cube[5][1] |= z;
cube[5][4] |= z;
cube[6][1] |= z;
cube[6][2] |= z;
cube[6][3] |= z;
break;
case 'e':

Electronics & Communication Engineering, FISAT 36

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

cube[0][1] |= z;
cube[0][2] |= z;
cube[0][3] |= z;

You're Reading a Preview cube[0][4] |= z;


cube[0][5] |= z;
cube[1][1] |= z;
cube[2][1] |= z;
Upload your documents to download.
cube[3][1] |= z;
cube[3][2] |= z;
cube[3][3] |= z;
cube[3][4] |= z;
cube[4][1] |= 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;

Become a Scribd member to read and download full


cube[3][1] |= z;
cube[3][2] |= z;
cube[3][3] |= z;
documents. cube[3][4] |= z;
cube[4][1] |= z;
cube[5][1] |= z;
cube[6][1] |= z;

Start your 30 day free trial


cube[6][2] |= z;
cube[6][3] |= z;
cube[6][4] |= z;
cube[6][5] |= z;
break;
case 'g':
cube[0][2] |= z;
cube[0][3] |= z;
cube[0][4] |= z;
cube[0][5] |= z;
cube[1][1] |= z;
cube[1][5] |= z;
cube[2][1] |= z;
cube[2][5] |= z;
cube[3][1] |= z;
cube[3][3] |= z;

Electronics & Communication Engineering, FISAT 37

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

cube[3][4] |= z;
cube[3][5] |= z;
cube[4][1] |= z;

You're Reading a Preview cube[5][1] |= z;


cube[5][5] |= z;
cube[6][2] |= z;
cube[6][3] |= z;
Upload your documents to download.
cube[6][4] |= z;
break;
case 'h':
cube[0][1] |= z;
cube[0][5] |= 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;

Become a Scribd member to read and download full


cube[5][1] |= z;
cube[5][5] |= z;
cube[6][1] |= z;
documents. cube[6][5] |= z;
break;
case 'i':
cube[0][2] |= z;

Start your 30 day free trial


cube[0][3] |= z;
cube[0][4] |= z;
cube[1][3] |= z;
cube[2][3] |= z;
cube[3][3] |= z;
cube[4][3] |= z;
cube[5][3] |= z;
cube[6][2] |= z;
cube[6][3] |= z;
cube[6][4] |= z;
break;
case 'j':
cube[0][2] |= z;
cube[0][3] |= z;
cube[1][1] |= z;
cube[1][4] |= z;

Electronics & Communication Engineering, FISAT 38

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

cube[2][4] |= z;
cube[3][4] |= z;
cube[4][4] |= z;

You're Reading a Preview cube[5][4] |= z;


cube[6][3] |= z;
cube[6][4] |= z;
cube[6][5] |= z;
Upload your documents to download.
case 'k':
break;

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;

Become a Scribd member to read and download full


break;
case 'l':
cube[0][1] |= z;
documents. cube[0][2] |= z;
cube[0][3] |= z;
cube[0][4] |= z;
cube[0][5] |= z;

Start your 30 day free trial


cube[1][1] |= z;
cube[2][1] |= z;
cube[3][1] |= z;
cube[4][1] |= z;
cube[5][1] |= z;
cube[6][1] |= z;
break;
case 'm':
cube[0][1] |= z;
cube[0][5] |= z;
cube[1][1] |= z;
cube[1][5] |= z;
cube[2][1] |= z;
cube[2][5] |= z;
cube[3][1] |= z;
cube[3][3] |= z;

Electronics & Communication Engineering, FISAT 39

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

cube[3][5] |= z;
cube[4][1] |= z;
cube[4][3] |= z;

You're Reading a Previewcube[4][5] |= z;


cube[5][1] |= z;
cube[5][2] |= z;
cube[5][4] |= z;
Upload your documents to download.
cube[5][5] |= z;
cube[6][1] |= z;
cube[6][5] |= z;
break;
case 'n':

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;

Become a Scribd member to read and download full


cube[4][2] |= z;
cube[4][5] |= z;
cube[5][1] |= z;
documents. cube[5][5] |= z;
cube[6][1] |= z;
cube[6][5] |= z;
break;

Start your 30 day free trial


case 'o':
cube[0][2] |= z;
cube[0][3] |= z;
cube[0][4] |= z;
cube[1][1] |= z;
cube[1][5] |= z;
cube[2][1] |= z;
cube[2][5] |= z;
cube[3][1] |= z;
cube[3][5] |= z;
cube[4][1] |= z;
cube[4][5] |= z;
cube[5][1] |= z;
cube[5][5] |= z;
cube[6][2] |= z;
cube[6][3] |= z;

Electronics & Communication Engineering, FISAT 40

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

cube[6][4] |= z;
break;
case 'p':

You're Reading a Preview cube[0][1] |= z;


cube[1][1] |= z;
cube[2][1] |= z;
cube[3][1] |= z;
Upload your documents to download.
cube[3][2] |= z;
cube[3][3] |= z;
cube[3][4] |= z;
cube[4][1] |= z;
cube[4][5] |= z;

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;

Become a Scribd member to read and download full


cube[1][1] |= z;
cube[1][4] |= z;
cube[2][1] |= z;
documents. cube[2][3] |= z;
cube[2][5] |= z;
cube[3][1] |= z;
cube[3][5] |= z;

Start your 30 day free trial


cube[4][1] |= 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 'r':
cube[0][1] |= z;
cube[0][5] |= z;
cube[1][1] |= z;
cube[1][4] |= z;
cube[2][1] |= z;
cube[2][3] |= z;
cube[3][1] |= z;

Electronics & Communication Engineering, FISAT 41

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

cube[3][2] |= z;
cube[3][3] |= z;
cube[3][4] |= z;

You're Reading a Preview cube[4][1] |= z;


cube[4][5] |= z;
cube[5][1] |= z;
cube[5][5] |= z;
Upload your documents to download.
cube[6][1] |= z;
cube[6][2] |= z;
cube[6][3] |= z;
cube[6][4] |= z;
break;

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;

Become a Scribd member to read and download full


cube[5][1] |= z;
cube[6][2] |= z;
cube[6][3] |= z;
documents. cube[6][4] |= z;
cube[6][5] |= z;
break;
case 't':

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;

Electronics & Communication Engineering, FISAT 42

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

cube[1][1] |= z;
cube[1][5] |= z;
cube[2][1] |= z;

You're Reading a Previewcube[2][5] |= z;


cube[3][1] |= z;
cube[3][5] |= z;
cube[4][1] |= z;
Upload your documents to download.
cube[4][5] |= z;
cube[5][1] |= z;
cube[5][5] |= z;
cube[6][1] |= z;
cube[6][5] |= 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;

Become a Scribd member to read and download full


cube[5][1] |= z;
cube[5][5] |= z;
cube[6][1] |= z;
documents. cube[6][5] |= z;
break;
case 'w':
cube[0][2] |= z;

Start your 30 day free trial


cube[0][4] |= z;
cube[1][1] |= z;
cube[1][3] |= z;
cube[1][5] |= z;
cube[2][1] |= z;
cube[2][3] |= z;
cube[2][5] |= z;
cube[3][1] |= z;
cube[3][3] |= z;
cube[3][5] |= z;
cube[4][1] |= z;
cube[4][5] |= z;
cube[5][1] |= z;
cube[5][5] |= z;
cube[6][1] |= z;
cube[6][5] |= z;

Electronics & Communication Engineering, FISAT 43

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

break;
case 'x':
cube[0][1] |= z;

You're Reading a Previewcube[0][5] |= z;


cube[1][1] |= z;
cube[1][5] |= z;
cube[2][2] |= z;
Upload your documents to download.
cube[2][4] |= z;
cube[3][3] |= z;
cube[4][2] |= z;
cube[4][4] |= z;
cube[5][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;

Become a Scribd member to read and download full


cube[4][5] |= z;
cube[5][1] |= z;
cube[5][5] |= z;
documents. cube[6][1] |= z;
cube[6][5] |= z;
break;
case 'z':

Start your 30 day free trial


cube[0][1] |= z;
cube[0][2] |= z;
cube[0][3] |= z;
cube[0][4] |= z;
cube[0][5] |= z;
cube[1][1] |= z;
cube[2][2] |= z;
cube[3][3] |= z;
cube[4][4] |= z;
cube[5][5] |= z;
cube[6][1] |= z;
cube[6][2] |= z;
cube[6][3] |= z;
cube[6][4] |= z;
cube[6][5] |= z;
break;

Electronics & Communication Engineering, FISAT 44

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

default:
break;
}
}
You're Reading a Preview
AN I MA TI ONS

Upload your documents to download.


#include "ab.h"
#include "ledcube.h"
#include "animations.h"
#include <stdlib.h>
#include <avr/io.h> Upload to Download
#include <inttypes.h>
#include <avr/interrupt.h>
#include <util/delay.h>
#include <math.h>
#include "rotation.h"
#include "translation.h" OR
void cube_stripes( void )
{
Become a Scribd member to read and download full
cube_clear();
for (uint8_t i = 0; i < 8; i++) {

documents. cube[0][0] |= ( 1 << i );


cube[1][7] |= ( 1 << (7-i) );
cube[2][0] |= ( 1 << i );
cube[3][7] |= ( 1 << (7-i) );

Start your 30 day free trial


cube[4][0] |= ( 1 << i );
cube[5][7] |= ( 1 << (7-i) );
cube[6][0] |= ( 1 << i );
cube[7][7] |= ( 1 << (7-i) );
cube_show_loop(STRIPES_DELAY);
}
for (uint8_t j = 1; j < 8; j++) {
cube_clear();
for (uint8_t i = 0; i < 8; i++) {
cube[0][j] |= ( 1 << i );
cube[1][7-j] |= ( 1 << i );
cube[2][j] |= ( 1 << i );
cube[3][7-j] |= ( 1 << i );
cube[4][j] |= ( 1 << i );
cube[5][7-j] |= ( 1 << i );
cube[6][j] |= ( 1 << i );

Electronics & Communication Engineering, FISAT 45

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

cube[7][7-j] |= ( 1 << i );
}
cube_show_loop(STRIPES_DELAY);

} You're Reading a Preview


}

Upload your documents to download.


void cube_2_auto( void )
{
cube_clear();

char cube2_arr[4][4];

Upload to Download
for (uint8_t i = 0; i < 4; i++){

for (uint8_t j = 0; j < 4; j++){

cube2_arr[i][j] = 0;

} OR
}

cube2_arr[0][0] |= (1 << 0);

Become a Scribd member


cube2_arr[0][1] |= (1 << 0); to read and download full
documents.
cube2_arr[0][2] |= (1 << 0);

cube2_arr[0][3] |= (1 << 0);

Start your 30 day free trial


cube2_arr[1][0] |= (1 << 0);

cube2_arr[1][1] |= (1 << 0);

cube2_arr[1][2] |= (1 << 0);

cube2_arr[1][3] |= (1 << 0);

cube2_arr[0][0] |= (1 << 1);

cube2_arr[0][1] |= (1 << 1);

cube2_arr[0][2] |= (1 << 1);

cube2_arr[0][3] |= (1 << 1);

Electronics & Communication Engineering, FISAT 46

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

cube2_arr[0][0] |= (1 << 2);

You're Reading a Preview


cube2_arr[0][1] |= (1 << 2);

cube2_arr[0][2] |= (1 << 2);

Upload your documents to download.


cube2_arr[0][3] |= (1 << 2);

cube2_arr[0][0] |= (1 << 3);

Upload to Download
cube2_arr[0][1] |= (1 << 3);

cube2_arr[0][2] |= (1 << 3);

cube2_arr[0][3] |= (1 << 3);

OR
cube2_arr[1][0] |= (1 << 3);

cube2_arr[1][1] |= (1 << 3);

Become a Scribd member


cube2_arr[1][2] |= (1 << 3); to read and download full
documents.
cube2_arr[1][3] |= (1 << 3);

cube_2_auto_show(cube2_arr);

Start your 30 day free trial


for (uint16_t i = 0; i < 2000; i++) {

uint8_t x = rand()%4;

uint8_t y = rand()%4;

uint8_t z = rand()%4;

if (cube2_arr[y][x] & (1 << z)) {

switch (rand()%6)
{
case 0:
while(y < 3) {

Electronics & Communication Engineering, FISAT 47

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

if (cube2_move_y_fwd(cube2_arr, y, x, z) == 0)
{
cube_2_auto_show(cube2_arr);

You're Reading a Preview y++;

} 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);

Become a Scribd member to read and download full


x++;

} else { break; }
documents.
}
break;
case 3:
while(x > 0) {

{ Start your 30 day free trial


if (cube2_move_x_rev(cube2_arr, y, x, z) == 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;

Electronics & Communication Engineering, FISAT 48

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

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 )
{

if (!(cube2[y+1][x] & (1 << z))){


cube2[y][x] &= ~(1 << z);

Become a Scribd member to read and download full


cube2[y+1][x] |= (1 << z);
return 0;
}

}
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;
}

uint8_t cube2_move_x_fwd( char cube2[4][4], uint8_t y, uint8_t x, uint8_t z )


{
if (!(cube2[y][x+1] & (1 << z))){
cube2[y][x] &= ~(1 << z);
cube2[y][x+1] |= (1 << z);
return 0;
}

Electronics & Communication Engineering, FISAT 49

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

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
}

uint8_t cube2_move_z_rev( char cube2[4][4], uint8_t y, uint8_t x, uint8_t z )

Become a Scribd member to read and download full


{
if (!(cube2[y][x] & (1 << (z-1)))){
cube2[y][x] &= ~(1 << z);
documents.
cube2[y][x] |= (1 << (z-1));
return 0;
}
return 1;
}
Start your 30 day free trial
void cube_2_auto_show( char cube2[4][4] )
{
for (uint8_t layer = 0; layer < 4; layer++){

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));

Electronics & Communication Engineering, FISAT 50

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

cube[layer*2+1][x*2] |= (1 << (z*2+1));


cube[layer*2+1][x*2+1] |= (1 << (z*2));
cube[layer*2+1][x*2+1] |= (1 << (z*2+1));

You're Reading a Preview


}
}
}

}
Upload your documents to download.
cube_show_loop(CUBE_AUTO_DELAY);

void cubes_2( void )


{
cube_clear(); Upload to Download
for (uint8_t i = 0; i < 8; i++ ){
cube[0][i] = 0xFF;
cube[1][i] = 0xFF;
}
cube_show_loop(CUBES2_DELAY);
for (uint8_t i = 0; i < 6; i++) { OR
move_y_fwd(2,2,3,3);
move_y_fwd(2,6,3,7);
move_y_fwd(6,2,7,3);

Become a Scribd member to read and download full


move_y_fwd(6,6,7,7);
cube_show_loop(CUBES2_DELAY);
}
for (uint8_t i = 0; i < 4; i++) {
move_y_fwd(0,0,1,1);
documents.
move_y_fwd(0,4,1,5);
move_y_fwd(4,0,5,1);

Start your 30 day free trial


move_y_fwd(4,4,5,5);
cube_show_loop(CUBES2_DELAY);
}
for (uint8_t i = 0; i < 2; i++) {
move_y_fwd(2,0,3,1);
move_y_fwd(6,0,7,1);
move_y_fwd(2,4,3,5);
move_y_fwd(6,4,7,5);
cube_show_loop(CUBES2_DELAY);
}

for (uint8_t i = 0; i < 4; i++) {


move_y_rev(6,2,7,3);
cube_show_loop(CUBES2_DELAY);
}
for (uint8_t i = 0; i < 2; i++) {

Electronics & Communication Engineering, FISAT 51

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

move_y_rev(4,0,5,1);
cube_show_loop(CUBES2_DELAY);
}

You're Reading a Preview


for (uint8_t i = 0; i < 6; i++) {
move_z_fwd(2,4,3,5);
cube_show_loop(CUBES2_DELAY);
}
Upload your documents to download.
for (uint8_t i = 0; i < 2; i++) {
move_y_rev(2,0,3,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);
}

for (uint8_t i = 0; i < 4; i++) {


move_y_fwd(0,2,1,3); OR
cube_show_loop(CUBES2_DELAY);
}

Become a Scribd member to read and download full


for (uint8_t i = 0; i < 2; i++) {
move_x_fwd(2,4,3,5);
cube_show_loop(CUBES2_DELAY);
}
documents.
cube_show_loop(CUBES2_DELAY*10);
}

Start your 30 day free trial


/* cubemoving 4x4 */
void cubes_4( void )
{
cube_clear();
for (uint8_t layer = 0; layer <= 3; layer++){
cube[layer][0] = 0b00001111;
cube[layer][1] = 0b00001111;
cube[layer][2] = 0b00001111;
cube[layer][3] = 0b00001111;
}
for (uint8_t layer = 4; layer <= 7; layer++){
cube[layer][4] = 0b11111111;
cube[layer][5] = 0b11111111;
cube[layer][6] = 0b11111111;
cube[layer][7] = 0b11111111;

Electronics & Communication Engineering, FISAT 52

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

}
cube_show_loop(CUBES4_DELAY);
for (uint8_t fourtimes = 0; fourtimes <= 3; fourtimes++){

You're Reading a Preview


move_y_rev(4,0,7,3);
cube_show_loop(CUBES4_DELAY);

}
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);
}

Become a Scribd member to read and download full


for (uint8_t fourtimes = 0; fourtimes <= 3; fourtimes++){
move_z_rev(4,0,7,3);
cube_show_loop(CUBES4_DELAY);
}
documents.
for (uint8_t fourtimes = 0; fourtimes <= 3; fourtimes++){
move_z_fwd(4,0,7,3);
cube_show_loop(CUBES4_DELAY);
}
Start your 30 day free trial
for (uint8_t fourtimes = 0; fourtimes <= 3; fourtimes++){
move_y_fwd(4,4,7,7);
cube_show_loop(CUBES4_DELAY);
}
for (uint8_t fourtimes = 0; fourtimes <= 3; fourtimes++){
move_x_fwd(0,0,3,3);
cube_show_loop(CUBES4_DELAY);
}
for (uint8_t fourtimes = 0; fourtimes <= 3; fourtimes++){
move_y_fwd(4,0,7,3);
cube_show_loop(CUBES4_DELAY);
}
for (uint8_t fourtimes = 0; fourtimes <= 3; fourtimes++){
move_y_rev(0,4,3,7);
cube_show_loop(CUBES4_DELAY);

Electronics & Communication Engineering, FISAT 53

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

}
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 your documents to download.


/* shrinking outline */
void outline_shrink( void )
{
cube_clear();
for (uint8_t i = 1; i < 7; i++ ){

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;

Become a Scribd member to read and download full


cube_show_loop(OUT_SHRINK_DELAY);

for (uint8_t i = 2; i < 6; i++ ){


documents.
cube[i][1] = 0b01000010;
cube[i][6] = 0b01000010;
}
for (uint8_t i = 2; i < 6; i++){

Start your 30 day free trial


cube[1][i] = 0b01000010;
cube[6][i] = 0b01000010;
}
cube[1][1] = 0b01111110;
cube[6][1] = 0b01111110;
cube[1][6] = 0b01111110;
cube[6][6] = 0b01111110;
cube_show_loop(OUT_SHRINK_DELAY);

for (uint8_t i = 3; i < 5; i++ ){


cube[i][2] = 0b00100100;
cube[i][5] = 0b00100100;
}
for (uint8_t i = 3; i < 5; i++){
cube[2][i] = 0b00100100;
cube[5][i] = 0b00100100;

Electronics & Communication Engineering, FISAT 54

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

}
cube[2][2] = 0b00111100;
cube[5][2] = 0b00111100;

You're Reading a Preview


cube[2][5] = 0b00111100;
cube[5][5] = 0b00111100;
cube_show_loop(OUT_SHRINK_DELAY);

Upload your documents to download.


cube[3][3] = 0b00011000;
cube[4][3] = 0b00011000;
cube[3][4] = 0b00011000;
cube[4][4] = 0b00011000;
cube_show_loop(10*OUT_SHRINK_DELAY);
}
Upload to Download
void cube_explosion( void )
{
uint8_t led_state = 0b00011000;
for (uint8_t i = 0; i <= 4; i++){
OR
for (uint8_t j = 3; j <= (i+3); j++) {
for (uint8_t k = 3; k <= (i+3); k++){
cube[j][7-k] = led_state;
cube[j][k] = led_state;

Become a Scribd member to read and download full


cube[7-j][7-k] = led_state;
cube[7-j][k] = led_state;
}
}
documents.
cube_show_loop(EXPLOSION_DELAY*(2*i+1));
led_state |= (1 << (3-i)) | (1 << (4+i));
}

Start your 30 day free trial


cube_show_loop(EXPLOSION_DELAY);
for (uint8_t i = 0; i <= 4; i++){
led_state &= ~((1 << (3-i)) | (1 << (4+i)));
for (uint8_t j = 3; j <= (i+3); j++) {
for (uint8_t k = 3; k <= (i+3); k++){
cube[j][7-k] = led_state;
cube[j][k] = led_state;
cube[7-j][7-k] = led_state;
cube[7-j][k] = led_state;
}
}
cube_show_loop(EXPLOSION_DELAY*(2*i+1));
}
cube_show_loop(EXPLOSION_DELAY);
}

Electronics & Communication Engineering, FISAT 55

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

/* wipe */
void cube_wipe( void )
{

You're Reading a Preview


cube_test_y();
cube_show_loop(SWIPE_DELAY);
for (uint8_t layer = 0; layer < 7; layer++){
for (uint8_t i = 0; i < 8; i++){
Upload your documents to download.
cube[layer][i] = 0;
cube[layer+1][i] = 0xFF;
}
cube_show_loop(SWIPE_DELAY);
}

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);

Start your 30 day free trial


for (uint8_t i = 0; i < 6; i++){
show_belt(cube_belt);
move_belt_left(cube_belt);
}
string++;
}
/* move the rest out */
for (uint8_t i = 0; i < 18; i++){
show_belt(cube_belt);
move_belt_left(cube_belt);
}
}

void move_belt_left( char *belt )


{
for (uint8_t i = 25; i > 1; i--){

Electronics & Communication Engineering, FISAT 56

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

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 a Scribd member to read and download full


/* right side */
for (uint8_t i = 5; i <= 11; i++){
for (uint8_t j = 0; j < 8; j++){
documents.
if (belt[i] & (1 << j))
cube[j][7] |= (1 << (12-i));
}
}

Start your 30 day free trial


/* front side */
for (uint8_t i = 12; i <= 17; i++){
for (uint8_t j = 0; j < 8; j++){
if (belt[i] & (1 << j))
cube[j][18-i] |= (1 << 0);
}
}
/* left side */
for (uint8_t i = 18; i <= 24; i++){
for (uint8_t j = 0; j < 8; j++){
if (belt[i] & (1 << j))
cube[j][0] |= (1 << (i-17));
}
}
cube_show_loop(SHOW_BELT_DELAY);
}

Electronics & Communication Engineering, FISAT 57

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

/* 2 fixed chars rotating */


void cube_fixed_string( void )
{
You're Reading a Preview
cube_clear();
_delay_ms(600);
cube_clear();
Upload your documents to download.
_delay_ms(600);
cube_char('3', 2);
_delay_ms(600);
rotate_90_deg();
_delay_ms(600);
rotate_90_deg();
_delay_ms(600); Upload to Download
cube_char('d', 2);
_delay_ms(600);
rotate_90_deg();
_delay_ms(600);
rotate_90_auto(8);
_delay_ms(600); OR
}

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);

Start your 30 day free trial


cube_clear();
_delay_ms(200);
cube_char(*string, (1 << (i-1)));
_delay_ms(300);
cube_show_loop(3);
_delay_ms(300);
}
string++;
_delay_ms(300);
}

void cube_string( char *string )


{

Electronics & Communication Engineering, FISAT 58

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

while(*string){
cube_clear();
cli();

You're Reading a Preview


PORTC = 0x00;
cube_char(*string, 16);
string++;
rotate_90_deg();
Upload your documents to download.
rotate_90_deg();
rotate_90_deg();
move_x_rev(1,0,6,7);
move_x_rev(1,0,6,7);
move_x_rev(1,0,6,7);
sei();
Upload to Download
cube_show_loop(CUBE_STRING_DELAY);
move_x_fwd(1,0,6,7);
cube_show_loop(CUBE_STRING_DELAY);
move_x_fwd(1,0,6,7);
cube_show_loop(CUBE_STRING_DELAY);
move_x_fwd(1,0,6,7);
cube_show_loop(CUBE_STRING_DELAY); OR
rotate_90_auto(1);
move_z_rev(0,0,7,7);
cube_show_loop(CUBE_STRING_DELAY);

Become a Scribd member to read and download full


move_z_rev(0,0,7,7);
cube_show_loop(CUBE_STRING_DELAY);
move_z_rev(0,0,7,7);
documents.
cube_show_loop(CUBE_STRING_DELAY);
move_z_rev(0,0,7,7);
cube_show_loop(CUBE_STRING_DELAY);
cube_flash(5);

} Start your 30 day free trial


cube_explosion();

cube_explosion();
cube_explosion();
}

void cube_outline( void )


{
cube_clear();
cube_show_loop(OUTLINE_DELAY);
for (uint8_t i = 0; i < 8; i++) {
cube[0][0] |= (1 << i);
cube[i][0] |= 1;
cube[0][i] |= 1;
cube_show_loop(OUTLINE_DELAY);
}

Electronics & Communication Engineering, FISAT 59

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

for (uint8_t i = 1; i < 8; i++) {


cube[7][0] |= (1 << i);
cube[7][i] |= 1;

You're Reading a Preview


cube[i][0] |= 128;
cube[0][i] |= 128;
cube[0][7] |= (1 << i);
cube[i][7] |= 1;
Upload your documents to download.
}
cube_show_loop(OUTLINE_DELAY);

for (uint8_t i = 1; i < 8; i++) {


cube[7][i] |= 128;
cube[7][7] |= (1 << i);

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++) {

Become a Scribd member to read and download full


cube[1][i] = 0b01000010;
cube[6][i] = 0b01000010;
cube[i][1] = 0b01000010;

}
documents.
cube[i][6] = 0b01000010;

cube_show_loop(30);
rotate_90_auto( 8 );

} Start your 30 day free trial


void cube_stars( void )
{
for (uint8_t j = 1; j < 30; j++){
for (uint8_t loops = 0; loops < 18; loops++){
cube_clear();
for (uint8_t i = 0; i< j; i++){
uint8_t randx = (uint8_t)rand()%8;
uint8_t randy = (uint8_t)rand()%8;
uint8_t randz = (uint8_t)rand()%8;
cube[randy][randx] = (1 << randz);
}
// cube[randy][randx] &= ~(1 << randz);

Electronics & Communication Engineering, FISAT 60

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

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);

Become a Scribd member to read and download full


_delay_ms(300);
cube[1][7] |= WAVES_DEPTH;
_delay_ms(300);
documents.
cube_show_loop(WAVES_DELAY);
_delay_ms(300);
move_x_rev(0,0,7,7);
_delay_ms(300);

Start your 30 day free trial


cube[0][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[0][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[1][7] |= WAVES_DEPTH;
_delay_ms(300);
cube_show_loop(WAVES_DELAY);
_delay_ms(300);

Electronics & Communication Engineering, FISAT 61

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

move_x_rev(0,0,7,7);
_delay_ms(300);
cube[2][7] |= WAVES_DEPTH;

You're Reading a Preview


_delay_ms(300);
cube_show_loop(WAVES_DELAY);
_delay_ms(300);
move_x_rev(0,0,7,7);
Upload your documents to download.
_delay_ms(300);
cube[3][7] |= WAVES_DEPTH;
_delay_ms(300);
cube_show_loop(WAVES_DELAY);
_delay_ms(00);

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);

Become a Scribd member to read and download full


_delay_ms(300);
move_x_rev(0,0,7,7);
_delay_ms(300);
documents.
cube[6][7] |= WAVES_DEPTH;
_delay_ms(300);
cube_show_loop(WAVES_DELAY);
_delay_ms(300);

Start your 30 day free trial


move_x_rev(0,0,7,7);
_delay_ms(300);
cube[7][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[7][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[6][7] |= WAVES_DEPTH;
_delay_ms(300);

Electronics & Communication Engineering, FISAT 62

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

cube_show_loop(WAVES_DELAY);
_delay_ms(300);
move_x_rev(0,0,7,7);

You're Reading a Preview


_delay_ms(300);
cube[5][7] |= WAVES_DEPTH;
_delay_ms(300);
cube_show_loop(WAVES_DELAY);
Upload your documents to download.
_delay_ms(300);
move_x_rev(0,0,7,7);
_delay_ms(300);
cube[4][7] |= WAVES_DEPTH;
_delay_ms(300);

Upload to Download
cube_show_loop(WAVES_DELAY);
_delay_ms(300);
}
}

void cube_sonic( void )


{ OR
cli();
for (uint8_t i = 0; i < 10; i++){
cube_clear();

Become a Scribd member to read and download full


cube_show_loop(20);
uint8_t mode = rand()%5;
uint8_t sonic_layers = (rand()%8)+1;
if (mode <= 3){
cube_clear();
documents.
for (uint8_t layer = 0; layer < sonic_layers; layer++){
cube[layer][0] = 0b10000000;

Start your 30 day free trial


}
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] = 0b01000000;
cube[layer][1] = 0b10000000;
}
for (uint8_t deg = 0; deg < mode; deg++){
rotate_90_deg();
}
cube_show_loop_wo_int(SONIC_DELAY);

Electronics & Communication Engineering, FISAT 63

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

cube_clear();
for (uint8_t layer = 0; layer < sonic_layers; layer++){
cube[layer][0] = 0b00100000;

You're Reading a Preview }


cube[layer][1] = 0b00100000;
cube[layer][2] = 0b11000000;

for (uint8_t deg = 0; deg < mode; deg++){


Upload your documents to download.
}
rotate_90_deg();

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);

Become a Scribd member


for (uint8_t layer =to read and download full
cube_clear();
0; layer < sonic_layers; layer++){
cube[layer][0] = 0b00001000;
documents.
cube[layer][1] = 0b00001000;
cube[layer][2] = 0b00010000;
cube[layer][3] = 0b00110000;
cube[layer][4] = 0b11000000;

Start your 30 day free trial


}
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++){

Electronics & Communication Engineering, FISAT 64

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

rotate_90_deg();
}
cube_show_loop_wo_int(SONIC_DELAY);

You're Reading a Preview cube_clear();


for (uint8_t layer = 0; layer < sonic_layers; layer++){
cube[layer][0] = 0b00000010;
Upload your documents to download. cube[layer][1] = 0b00000010;
cube[layer][2] = 0b00000010;
cube[layer][3] = 0b00000100;
cube[layer][4] = 0b00001000;
cube[layer][5] = 0b00010000;

Upload to Download
}
cube[layer][6] = 0b11100000;

for (uint8_t deg = 0; deg < mode; deg++){


rotate_90_deg();
}
cube_show_loop_wo_int(SONIC_DELAY);

cube_clear(); OR
for (uint8_t layer = 0; layer < sonic_layers; layer++){
cube[layer][0] = 0b00000001;
cube[layer][1] = 0b00000001;

Become a Scribd member to read and download full


cube[layer][2] = 0b00000001;
cube[layer][3] = 0b00000010;
cube[layer][4] = 0b00000010;
documents.
cube[layer][5] = 0b00000100;
cube[layer][6] = 0b00011000;
cube[layer][7] = 0b11100000;
}

Start your 30 day free trial


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][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);

Electronics & Communication Engineering, FISAT 65

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

cube_clear();
for (uint8_t layer = 0; layer < sonic_layers; layer++){

You're Reading a Preview }


cube[layer][6] = 0b00000001;
cube[layer][7] = 0b00000010;

for (uint8_t deg = 0; deg < mode; deg++){


Upload your documents to download.
}
rotate_90_deg();

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++){

Become a Scribd member to read and download full


cube[layer][3] = 0b00011000;
cube[layer][4] = 0b00011000;
}
documents.
cube_show_loop_wo_int(SONIC_DELAY);
cube_clear();
for (uint8_t layer = 0; layer < sonic_layers; layer++){
cube[layer][2] = 0b00011000;

Start your 30 day free trial


cube[layer][3] = 0b00100100;
cube[layer][4] = 0b00100100;
cube[layer][5] = 0b00011000;
}
cube_show_loop_wo_int(SONIC_DELAY);
cube_clear();
for (uint8_t layer = 0; layer < sonic_layers; layer++){
cube[layer][1] = 0b00011000;
cube[layer][2] = 0b00100100;
cube[layer][3] = 0b01000010;
cube[layer][4] = 0b01000010;
cube[layer][5] = 0b00100100;
cube[layer][6] = 0b00011000;
}
cube_show_loop_wo_int(SONIC_DELAY);
cube_clear();

Electronics & Communication Engineering, FISAT 66

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

for (uint8_t layer = 0; layer < sonic_layers; layer++){


cube[layer][0] = 0b00011000;
cube[layer][1] = 0b01100110;

You're Reading a Preview cube[layer][2] = 0b01000010;


cube[layer][3] = 0b10000001;
cube[layer][4] = 0b10000001;
cube[layer][5] = 0b01000010;
Upload your documents to download. cube[layer][6] = 0b01100110;
cube[layer][7] = 0b00011000;
}
cube_show_loop_wo_int(SONIC_DELAY);
cube_clear();

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;

Become a Scribd member to read and download full


}
cube_show_loop_wo_int(SONIC_DELAY);
}
}
sei();
documents.
}

Start your 30 day free trial


void cube_diamond( void )
{
cube_clear();
for ( uint8_t i = 0; i < 3; i++ ){
cube[4][2] = 0b01111110;
}
}

void cube_block_wipe( void )


{
for (uint8_t i = 0; i < 8; i++){
move_x_fwd(0,0,7,7);
for(uint8_t layer = 0; layer < 8; layer++){
cube[layer][0] |= 0xFF;
}

Electronics & Communication Engineering, FISAT 67

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

cube_show_loop(BLOCK_WIPE_DELAY);
_delay_ms(100);
}

You're Reading a Preview


cube_show_loop(BLOCK_WIPE_DELAY);
_delay_ms(100);
for (uint8_t i = 8; i != 0; i--){
for(uint8_t layer = 0; layer < 8; layer++){
Upload your documents to download.
}
cube[layer][i-1] = 0x00;

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);
}

Become a Scribd member to read and download full


for (uint8_t layer = 8; layer != 0; layer--){
for (uint8_t i = 0; i < 8; i++){ cube[layer-1][i] = 0x00; }
cube_show_loop(BELT_WIPE_DELAY);

}
}
documents.

Start your 30 day free trial


void cube_flash( uint8_t cycle )
{
for (; cycle > 0; cycle--){
cli();
PORTC = 0x00;
_delay_ms(BLINK_DELAY*5);
_delay_ms(BLINK_DELAY*5);
_delay_ms(BLINK_DELAY*5);
_delay_ms(BLINK_DELAY*5);
_delay_ms(BLINK_DELAY*5);
_delay_ms(BLINK_DELAY*5);
sei();
_delay_ms(BLINK_DELAY*5);
_delay_ms(BLINK_DELAY*5);
_delay_ms(BLINK_DELAY*5);
_delay_ms(BLINK_DELAY*5);

Electronics & Communication Engineering, FISAT 68

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

_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

for (; x1 <= x2; x1++){ documents.


for (uint8_t i = y1; i <= y2; i++){
cube[x1][i] = (cube[x1][i] << 1);
}

}
} 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);
}
}
}

void move_y_fwd( uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2 )


{

Electronics & Communication Engineering, FISAT 69

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

for (uint8_t i = 7; i > 0; i--){


for (uint8_t j = x1; j <= x2; j++){

You're Reading a Preview for (uint8_t k = y1; k <= y2; k++) {


if ((cube[i-1][j] & (1 << k))){
cube[i][j] |= (1 << k);
cube[i-1][j] &= ~(1 << k);
Upload your documents to download. } else {
cube[i-1][j] &= ~(1 << k);
}
}

}
}
Upload to Download
}

void move_y_rev( uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2 )


{
for (uint8_t i = 1; i < 8; i++){
OR
for (uint8_t j = x1; j <= x2; j++){

for (uint8_t k = y1; k <= y2; k++) {

Become a Scribd membercube[i-1][j]


to read and download full
if ((cube[i][j] & (1 << k))){
|= (1 << k);
cube[i][j] &= ~(1 << k);
documents.
} else {
cube[i-1][j] &= ~(1 << k);
}
}

Start
} your 30 day free trial
}
}

void move_x_fwd( uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2 )


{
for (uint8_t layer = y1; layer <= y2; layer++) {
for (uint8_t j = 7; j > 0; 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 {

Electronics & Communication Engineering, FISAT 70

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

cube[layer][j] &= ~(1 << k);


}
}

You're Reading a Preview


}
}

}
Upload your documents to download.
void move_x_rev( uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2 )
{

for (uint8_t layer = y1; layer <= y2; layer++) {

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.

Start your 30 day free trial


#include <stdlib.h>
#include <avr/io.h>
#include <inttypes.h>
#include <util/delay.h>
#include <math.h>
#include "ledcube.h"
#include "animations.h"
#include "rotation.h"

void rotate_90_auto ( uint8_t cycle )


{
for (uint8_t loopcnt = 0; loopcnt < cycle; loopcnt++) {_delay_ms(30);
uint8_t cube_org[8][8];
_delay_ms(30);

Electronics & Communication Engineering, FISAT 71

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

for (uint8_t i = 0; i < 8; i++){


_delay_ms(30);
for (uint8_t j = 0; j < 8; j++){

You're Reading a Preview


_delay_ms(30);
cube_org[i][j] = cube[i][j];
_delay_ms(30);
}
Upload your documents to download.
}
cube_clear();

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++) {

Become a Scribd member to read and download full


for ( uint8_t y = 0; y < 8; y++) {
if ( cube_org[layer][y] & (0x80 >> x))
cube[layer][(7-x)] |= (1 << (7-y));

}
}
documents.
}
}

Start your 30 day free trial


LED CUBE

#include "ledcube.h"
#include <stdlib.h>
#include <avr/io.h>
#include <inttypes.h>
#include <util/delay.h>
#include <math.h>

#include <avr/interrupt.h>

Electronics & Communication Engineering, FISAT 72

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

#include "ab.h"
#include "rotation.h"

You're Reading a Preview


void cube_show_init( void )
{
TCCR0 |= (1 << CS02) | (0 << CS00);
Upload your documents to download.
}
TIMSK |= (1 << TOIE0);

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];

Become a Scribd member to read and download full


asm volatile("nop");
PORTA |= (1 << j);
asm volatile("nop");
PORTA = 0;
asm volatile("nop");
documents.
}
PORTC |= (1 << cube_show_layer);

Start your 30 day free trial


asm volatile("nop");
if (cube_show_layer < 7) {
cube_show_layer++;
} else {
cube_show_layer = 0;
}
}

void cube_clear ( void )


{
for (uint8_t i = 0; i < 8; i++){
for (uint8_t j = 0; j < 8; j++){
cube[i][j] = 0;
}
}
}

Electronics & Communication Engineering, FISAT 73

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

void cube_clear_layer(uint8_t layer)


{

You're Reading a Preview


for (uint8_t j = 0; j < 8; 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;

Become a Scribd member to read and download full


cube[1][2] = 7;
cube[2][0] = 7;
cube[2][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;

Electronics & Communication Engineering, FISAT 74

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

void cube_random( void )


{
for ( uint8_t i = 0; i < 8; i++ ){

You're Reading a Preview


for ( uint8_t j= 0; j < 8; j++) {

}
cube[i][j] = rand()%255;

}
Upload your documents to download.
}

void cube_test_z( void )


{
for (uint8_t i = 0; i < 8; i++){

Upload to Download
for (uint8_t j = 0; j < 8; j++){
cube[i][j] = 1;
}
}
}

void cube_test_y( void )


{ OR
for (uint8_t i = 0; i < 8; i++){
cube[0][i] = 255;
}

Become a Scribd member to read and download full


}

void cube_test_x( void )


{
for (uint8_t i = 0; i < 8; i++){
documents.
cube[i][0] = 255;
}
}
Start your 30 day free trial
void cube_show( void )
{

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);

Electronics & Communication Engineering, FISAT 75

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

_delay_ms(1);
PORTC = 0x00;
asm volatile("nop");

You're Reading a Preview


asm volatile("nop");
asm volatile("nop");
asm volatile("nop");
asm volatile("nop");
Upload
}
}
your documents to download.
void cube_show_loop( uint8_t cycle )
{

Upload to Download
for (uint16_t i = 0; i < cycle*2; i++){
_delay_ms(8);
}
}

void cube_show_loop_wo_int( uint8_t cycle )


{
for (uint16_t i = 0; i < cycle*2; i++){ OR
cube_show();
}

Become a Scribd member to read and download full


}

MA I N
documents.

Start your 30 day free trial


#include <stdlib.h>
#include <avr/io.h>
#include <inttypes.h>
#include <util/delay.h>
#include <math.h>
#include <avr/interrupt.h>
#include "ledcube.h"
#include "animations.h"

void init(void)
{

PORTC = 0;
DDRC = 0xFF;
DDRA = 0xFF;

Electronics & Communication Engineering, FISAT 76

Ad Download to read ad-free

3D LED CUBE DISPLAY (8x8x8 PIXELS)

DDRD = 0xFF;
PORTA = 0;
PORTD = 0;

You're Reading a Preview


cube_show_init();
_delay_ms(1);
sei();
_delay_ms(1);
Upload your documents to download.
}

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();

Become a Scribd member to read and download full


cube_wipe();
cube_waves();
cube_explosion();
cube_stripes();
cube_belt_wipe();
documents.
outline_shrink();
cube_explosion();

Start your 30 day free trial


cubes_4();
cubes_4();
cube_belt_wipe();
cube_outline();
cube_explosion();
cube_stars();
cube_explosion();
cube_sonic();
cube_belt_wipe();
cube_string_belt(" .thank you");

}
}

Electronics & Communication Engineering, FISAT 77

Share this document

You might also like


PDF 81% (16)
LED Matrix Display Project Report

81 pages

PDF 100% (2)


Arduino Nano Propeller LED Analog Clock
Syn PDF

11 pages

PDF No ratings yet


3D 8x8x8 LED Cube Report

19 pages

PDF No ratings yet


Proposal Presentation of Mini Project:
Presented To

10 pages

PDF 0% (1)
"3D Led Cube": Project Synopsis Bachler of
Engineering Electrical Engineering (7 Sem.)
Krishna Engineering College, Bhilai
5 pages

PDF No ratings yet


Chapter - 1

16 pages

PDF No ratings yet


Report 222

41 pages

PDF No ratings yet


Reoort 21

42 pages

PDF No ratings yet


LED Dot Matrix Message

11 pages

PDF 100% (2)


LCD

19 pages

PDF No ratings yet


Project File

49 pages

PDF No ratings yet


Balaji Institute of Technology & Science:
Embedded System Implimentation For 3D
Led Cube Mini Project by

24 pages

Show more

About Support
About Scribd, Inc. Help / FAQ

Everand: Ebooks & Accessibility


Audiobooks
Purchase help
SlideShare
AdChoices
Join our team!

Contact us Social
Instagram
Legal
Facebook
Terms
Pinterest
Privacy

Copyright

Cookie Preferences

Do not sell or share my


personal information

Get our free apps

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

Customize Your Choices

Accept All
Ad
Continue Without Accepting

You might also like