Advertisement  

Monday, 26 June 2017
     
 
Main Menu
Home Home
Shop Shop
News News
BASCOM-AVR BASCOM-AVR
BASCOM-8051 BASCOM-8051
Products Products
Application Notes Application Notes
Publications Publications
Links Links
Support Center Support Center
Downloads Downloads
Forum Forum
Resellers Resellers
Contact Us Contact Us
Updates Updates
MCS Wiki MCS Wiki
Online Help
BASCOM-AVR Help BASCOM-AVR Help
BASCOM-8051 Help BASCOM-8051 Help
Contents in Cart
Show Cart
Your Cart is currently empty.
Search the Shop

Products Search

User Login
Username

Password

If you have problem after log in with disappeared login data, please press F5 in your browser

RSS News
 
     
 

 
   
     
 
AN #152 - Led 3D-ball matrix Print
Rubashka Vasiliy , Ukraine , 2007

Led 3D-ball was planned like experiment with 3D lights effects. I think it could be using such balls for New Year trees, bars, cafes, disco and more.
The matrix measuring twenty rays all over seven led Ė it is physically led 3D-ball.
Microcontroller At90S2313 and 2 decoder 74145 are profiting by led 3D-balls. The scheme of profits be just on the point of two fee, it is at center of the ball, lights depart from its.
This lights was unsolder in one line by cathodes of led, anodes apply a thin layers of had been function by thin wire, like spiderís web. Whole details of construction had been unsoldering between two fee, it was did to decrease of the main block dimensions. The mounting was made more compact and the ball was more increasing round-up. Before to do mounting, you need pins of  microcircuit turn back out 90 degree, it will be soldering all details by one  side on first fee, then to close second fee on the opposition deduction and to finish your work. Wires of programmatic and power supply are feign.  The microcontroller  to programming and making control of work done  is the signal inside down. Only if it would be done, you could make the mounting of led. You could make your work not so hard. You need a template with making inside on plastic some apertures, across whole line  in 20 millimeter, one by one then, turn back a cathodes of led, near its corps, by 90 degree, led to get inside of a template and to do solder the light the turn back deduction. Every from 20 lights are soldering in a fee and turn back by picture.  An anodes that isnít near of center led are soldering between by wires from copper.  Wires could be 10 centimeters. A construction must be lice correcting dodecahedron (an edge-pentagon, in such top include by 3 ribs). Abandon anodes to solder by layers between. Then, we need to link up every layers to deduction of accordance strength.  Microcontroller will be making the programmatic lights effects, ofcourse  if your mounting is correct. Itís change by automatic-numbers of repetition, speed, lights. That is enough no possibility of meddling from outside.

You can get video from my home page Ė http://ledeffects.net/data/Kontroller/shar/shar.avi.
Here is original article Russian  Ė http://ledeffects.net/pages/?id=16.









Schematic & Layout:






Source code for BASCOM:

'****************************************************************************
'* Filename : SHAR *
'* Revision : 1.0 *
'* Controller : AT90S2313 *
'* Compiler : BASCOM-AVR 1.11.8.3 DEMO *
'* Author : Rubashka Vasiliy , Ukraine , 2007 *
'* WWW : http://ledeffects.net  *
'* Mail : info@ledeffects.net *
'****************************************************************************
$crystal = 10000000
Dim Temp As Byte
Dim Speed As Byte
Dim S As Byte
Dim Noise As Byte
Dim N As Byte
Dim R As Byte

Config Portb = Output
Config Portd = Output

Temp
= 2
Speed
= 5
'------------------------------
Do
 
For S = 1 To Speed
 
Gosub Effect1
 
Next S

 
For S = 1 To Speed
 
Gosub Effect2
 
Next S

 
For S = 1 To Speed
 
Gosub Effect3
 
Next S

 
For S = 1 To Speed
 
Gosub Effect4
 
Next S

 
For S = 1 To Speed
 
Gosub Effect5
 
Next S

 Temp
= Rnd(3)
 Temp
= Temp + 1
 Speed
= Rnd(5)
 Speed
= Speed + 1
Loop
'------------------------------
Effect1
:
 
Portd.0 = 0
 
Portb.3 = 1
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portb.3 = 0
 
Portb.2 = 1
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portb.2 = 0
 
Portb.1 = 1
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portb.1 = 0
 
Portb.0 = 1
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portb.0 = 0
 
Portd.6 = 1
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portd.6 = 0
 
Portd.1 = 1
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portd.1 = 0
 
Portd.0 = 1
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portd.1 = 1
 
Portd.0 = 0
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portd.6 = 1
 
Portd.1 = 0
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portb.0 = 1
 
Portd.6 = 0
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portb.1 = 1
 
Portb.0 = 0
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portb.2 = 1
 
Portb.1 = 0
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portb.2 = 0
Return
'------------------------------
Effect2
:
 
Portd.0 = 1
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portd.1 = 1
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portd.6 = 1
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portb.0 = 1
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portb.1 = 1
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portb.2 = 1
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portb.3 = 1
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portd.0 = 0
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portd.1 = 0
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portd.6 = 0
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portb.0 = 0
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portb.1 = 0
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portb.2 = 0
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portb.3 = 0
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
Return
'------------------------------
Effect3
:
 
Portb.3 = 1
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portb.2 = 1
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portb.1 = 1
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portb.0 = 1
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portd.6 = 1
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portd.1 = 1
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portd.0 = 1
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor

 
Portb.3 = 0
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portb.2 = 0
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portb.1 = 0
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portb.0 = 0
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portd.6 = 0
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portd.1 = 0
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Portd.0 = 0
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
Return
'------------------------------
Effect4
:
 
Gosub Ledon
 
Portb.3 = 0
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Ledon
 
Portb.2 = 0
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Ledon
 
Portb.1 = 0
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Ledon
 
Portb.0 = 0
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Ledon
 
Portd.6 = 0
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Ledon
 
Portd.1 = 0
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Ledon
 
Portd.0 = 0
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Ledon
 
Portd.1 = 0
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Ledon
 
Gosub Ledon
 
Portd.6 = 0
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Ledon
 
Portb.0 = 0
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Ledon
 
Portb.1 = 0
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Ledon
 
Portb.2 = 0
 
Gosub Perebor
 
Gosub Perebor
 
Gosub Perebor
Return
'------------------------------
Effect5
:
 
For Noise = 1 To 50
 
Gosub Randlamp
 
Gosub Perebor
 
Next
Return
'------------------------------
Ledon
:
 
Portb.3 = 1
 
Portb.2 = 1
 
Portb.1 = 1
 
Portb.0 = 1
 
Portd.6 = 1
 
Portd.1 = 1
 
Portd.0 = 1
Return
'------------------------------
Perebor
:
 
'1
 
Portd.2 = 0
 
Portd.3 = 0
 
Portd.4 = 0
 
Portd.5 = 0
 
Portb.6 = 0
 
Portb.5 = 0
 
Portb.7 = 0
 
Portb.4 = 0
 
Waitms Temp
 
'2
 
Portd.2 = 0
 
Portd.3 = 0
 
Portd.4 = 0
 
Portd.5 = 1
 
Portb.6 = 0
 
Portb.5 = 0
 
Portb.7 = 0
 
Portb.4 = 1
 
Waitms Temp
 
'3
 
Portd.2 = 0
 
Portd.3 = 0
 
Portd.4 = 1
 
Portd.5 = 0
 
Portb.6 = 0
 
Portb.5 = 0
 
Portb.7 = 1
 
Portb.4 = 0
 
Waitms Temp
 
'4
 
Portd.2 = 0
 
Portd.3 = 0
 
Portd.4 = 1
 
Portd.5 = 1
 
Portb.6 = 0
 
Portb.5 = 0
 
Portb.7 = 1
 
Portb.4 = 1
 
Waitms Temp
 
'5
 
Portd.2 = 0
 
Portd.3 = 1
 
Portd.4 = 0
 
Portd.5 = 0
 
Portb.6 = 0
 
Portb.5 = 1
 
Portb.7 = 0
 
Portb.4 = 0
 
Waitms Temp
 
'6
 
Portd.2 = 0
 
Portd.3 = 1
 
Portd.4 = 0
 
Portd.5 = 1
 
Portb.6 = 0
 
Portb.5 = 1
 
Portb.7 = 0
 
Portb.4 = 1
 
Waitms Temp
 
'7
 
Portd.2 = 0
 
Portd.3 = 1
 
Portd.4 = 1
 
Portd.5 = 0
 
Portb.6 = 0
 
Portb.5 = 1
 
Portb.7 = 1
 
Portb.4 = 0
 
Waitms Temp
 
'8
 
Portd.2 = 0
 
Portd.3 = 1
 
Portd.4 = 1
 
Portd.5 = 1
 
Portb.6 = 0
 
Portb.5 = 1
 
Portb.7 = 1
 
Portb.4 = 1
 
Waitms Temp
 
'9
 
Portd.2 = 1
 
Portd.3 = 0
 
Portd.4 = 0
 
Portd.5 = 0
 
Portb.6 = 1
 
Portb.5 = 0
 
Portb.7 = 0
 
Portb.4 = 0
 
Waitms Temp
 
'10
 
Portd.2 = 1
 
Portd.3 = 0
 
Portd.4 = 0
 
Portd.5 = 1
 
Portb.6 = 1
 
Portb.5 = 0
 
Portb.7 = 0
 
Portb.4 = 1
 
Waitms Temp
Return
'------------------------------
Randlamp
:
 
Portb.3 = 0
 
Portb.2 = 0
 
Portb.1 = 0
 
Portb.0 = 0
 
Portd.6 = 0
 
Portd.1 = 0
 
Portd.0 = 0
 R
= Rnd(70)
 R
= R + 1

 
If R <= 10 Then
 
Portb.3 = 1
 
End If

 
If R <= 20 And R > 10 Then
 
Portb.2 = 1
 
End If

 
If R <= 30 And R > 20 Then
 
Portb.1 = 1
 
End If

 
If R <= 40 And R > 30 Then
 
Portb.0 = 1
 
End If

 
If R <= 50 And R > 40 Then
 
Portd.6 = 1
 
End If

 
If R <= 60 And R > 50 Then
 
Portd.1 = 1
 
End If

 
If R <= 70 And R > 60 Then
 
Portd.0 = 1
 
End If
Return