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 #128 - Moving LED messaging Waver with BI-colour LEDS Print
Moving LED messaging Waver with BI-colour LEDS

This application note is written by Walter Miraglia. When you have questions you can contact him at the bascom user list.

Note from MCS : This is a great project for beginners. With little hardware and a relatively small program, you can create great visual effects. Since the 90S2313 is used, it will work with the free DEMO too.

 

LED Messaging Waver ( using persistence of Vision to create letters and words) 

The circuit consists of LEDs tied from the 7 pins of portd to the first 7 pins of portb. The remaining pin (portb.7) can be used to switch to different messages or change colour.
This pin is connected to a button with a 10K pull up resister to +5V and a micro switch to GND. (not shown on this schematic) 

All the LED's are Bi coloured green and red. There are 7 in total.  
The circuit and PCB are published with permission from avrcircuits.


 

This works best if the display is spun in a circle or waved left and right. The flashing LEDS when moved left and right will create the illusion of floating letters in the air. This is known as persistence of vision.  

When waving the display right and left the message is displayed forwards then backwards on the back swing. If rotated clockwise the message remains correct. With perhaps some timing changes or a mercury switch that detects forward motion only, the message can be turned off when swinging back… any takers? I will look into this. 



When waving the display with your hands to the right the words are displayed correctly as you swing back to the left….the letters are displayed reverse. 
 


If you are spinning the display in a circle clockwise the display should read correctly.... have fun with it... Bring it a rave and wave it around with your personal message. 

The LED's should be as close as possible so the words do not appear to "dotty" 

The above pictures were taken with a digital camera in a darkened room. 

P.S. Squeezy is my wife….
The included BASCOM-AVR program uses an AT90S2313 Atmel chip program will display two sentences one in green and one in red. The messages used in the example program consist of a 7X7 matrix .... but it could really be 7 vertically by anything….because values are calculated vertically.  

Please refer to the table below (matrixletter.gif) for the whole alphabet.  
This table is copied with permission from Colin MItchell. His site is called http://www.talkingelectronics.com

  

  

  

Here is a picture of the one I built on a perf board. Included in the zip file are all the images as well as a PC Board layout in Eagle 4.09. 

  


  

The following 2 BASCOM-AVR programs are used to display the messages on the LEDs. Please note using the above table you can make it display what ever message you like. You can even do graphics if you like. I built a similar one using 8 red LEDs from portb to gnd that allowed me an 8 X 8 matrix for graphic characters and letters.…The programming is simpler (Listing 2) 

Here you can download TextGenerator program (.exe)

Listing 1 – two text messages two colours. 


 

' I used an ATMEL AT90S2313 20 Pin chip.
' and built it with a 5volt regulator and 4 mhz resonator.
'7 bi-coloured LEDs are attached from Portd to Portb with a current limitting resister.
'Portd.0 to Portb.0
'portd.1 to Portb.1
'Portd.2 to Portb.2
'Portd.3 to Portb.3
'Portd.4 to Portb.4
'Portd.5 to Portb.5
'Portd.6 to Portb.6
'Portb.7 to pull up resister and momentary switch to gnd.
'This switch can be used to goto a subroutine to change colour or between messages....
'currently not using it with this Application Note.

Dim A As Byte , B1 As Byte , C As Byte
Config Portd = Output
Config Portb = Output
Start:
Portb = 00  'set Portb to all low to display text in Red.
For C = 1 To 40 '147 bytes to send to the display, loops 147 times.
Restore Xxx 'displays the message 40 times before switching to
For A = 1 To 147 'second message.
 
Read B1 : Portd = B1 'sending text info to portd
Waitms 1
Next
Waitms 1
Next
C
= 0
For C = 1 To 40
Portd = 0 'set Portd to all low to display text in Green.
Restore Yyy '2nd message to be displayed in Green 40 times
For A = 1 To 140  'with 140 bytes of data to the displays to make up the message.
 
Read B1 : Portb = B1 ' sending text info to portb
Waitms 1
Next
Waitms 1
Next

Goto Start
End

'Red Message
Xxx
:
Data &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00
Data &H7F , &H01 , &H01 , &H01 , &H01 , &H00 , &H00 'l
Data &H3F , &H41 , &H41 , &H41 , &H3F , &H00 , &H00 'o
Data &H78 , &H06 , &H01 , &H06 , &H78 , &H00 , &H00 'v
Data &H7F , &H49 , &H49 , &H41 , &H00 , &H00 , &H00 'e
Data &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00
Data &H3F , &H40 , &H40 , &H3F , &H40 , &H40 , &H3F 'm
Data &H3E , &H01 , &H01 , &H01 , &H3E , &H00 , &H00 'u
Data &H7F , &H48 , &H48 , &H40 , &H00 , &H00 , &H00 'f
Data &H7F , &H48 , &H48 , &H40 , &H00 , &H00 , &H00 'f
Data &H00 , &H00 , &H7F , &H00 , &H00 , &H00 , &H00 'i
Data &H7F , &H20 , &H1C , &H02 , &H7F , &H00 , &H00 'n
Data &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00
Data &H3F , &H41 , &H41 , &H41 , &H3F , &H00 , &H00 'o
Data &H7F , &H48 , &H48 , &H40 , &H00 , &H00 , &H00 'f
Data &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00
Data &H7F , &H01 , &H01 , &H01 , &H01 , &H00 , &H00 'l
Data &H3F , &H41 , &H41 , &H41 , &H3F , &H00 , &H00 'o
Data &H78 , &H06 , &H01 , &H06 , &H78 , &H00 , &H00 'v
Data &H7F , &H49 , &H49 , &H41 , &H00 , &H00 , &H00 'e
Data &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00

'Green Message
Yyy
:
Data &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00
Data &H00 , &H00 , &H7F , &H00 , &H00 , &H00 , &H00 'i
Data &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 '
Data &H7F , &H01 , &H01 , &H01 , &H01 , &H00 , &H00 'l
Data &H3F , &H41 , &H41 , &H41 , &H3F , &H00 , &H00 'o
Data &H78 , &H06 , &H01 , &H06 , &H78 , &H00 , &H00 'v
Data &H7F , &H49 , &H49 , &H41 , &H00 , &H00 , &H00 'e
Data &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00
Data &H40 , &H20 , &H1F , &H20 , &H40 , &H00 , &H00 'y
Data &H3F , &H41 , &H41 , &H41 , &H3F , &H00 , &H00 'o
Data &H3E , &H01 , &H01 , &H01 , &H3E , &H00 , &H00 'u
Data &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00
Data &H32 , &H49 , &H49 , &H49 , &H26 , &H00 , &H00 's
Data &H3E , &H41 , &H45 , &H43 , &H3F , &H00 , &H00 'q
Data &H3E , &H01 , &H01 , &H01 , &H3E , &H00 , &H00 'u
Data &H7F , &H49 , &H49 , &H41 , &H00 , &H00 , &H00 'e
Data &H7F , &H49 , &H49 , &H41 , &H00 , &H00 , &H00 'e
Data &H43 , &H45 , &H49 , &H51 , &H61 , &H00 , &H00 'z
Data &H40 , &H20 , &H1F , &H20 , &H40 , &H00 , &H00 'y
Data &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00



Listing 2
two text messages single colour.

' I used an ATMEL AT90S2313 20 Pin chip.
' and built it with a 5volt regulator and 4 mhz resonator.
'8 superbright red LEDs are attached from Portb to Gnd through a current limitting resister.
'Portd.2 to pull up resister and momentary switch to gnd.
'This switch can be used to goto a subroutine to change between messages....
'currently not using it with this Application Note.


Dim A As Byte , B1 As Byte , C As Integer
Config Portb = Output
Wait 2
Start:
Portb = 00
For C = 1 To 100
Restore Xxx 'gets data from the XXX table.
For A = 1 To 32 'there are 32 bytes of data so the loop must be done 32 times
 
Read B1 : Portb = B1  'values from the table are output to the LEDs.
Waitus 400 'deturmins the width of each letter
Next 'the first message is I love U with a heart shape for the word love.
Waitms 1
Next
C
= 0
For C = 1 To 100
Portb = 00
Restore Yyy
For A = 1 To 119
 
Read B1 : Portb = B1
Waitus 400 'deturmins the width of each letter
Next '119 bytes of data to display the message here
Waitms 1 'so the loops goes for 119 times.
Next

Goto Start
End


Xxx
:
Data &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00
Data &H81 , &HFF , &H81 , &H00 , &H00 , &H00 , &H30 , &H48
Data &H84 , &H82 , &H41 , &H82 , &H84 , &H48 , &H30 , &H00
Data &H00 , &H00 , &HFE , &H01 , &H01 , &H01 , &HFE , &H00
Data &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00


Yyy
:
Data &H00 , &H00 , &H7F , &H00 , &H00 , &H00 , &H00 'i
Data &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 '
Data &H7F , &H01 , &H01 , &H01 , &H01 , &H00 , &H00 'l
Data &H3F , &H41 , &H41 , &H41 , &H3F , &H00 , &H00 'o
Data &H78 , &H06 , &H01 , &H06 , &H78 , &H00 , &H00 'v
Data &H7F , &H49 , &H49 , &H41 , &H00 , &H00 , &H00 'e
Data &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00
Data &H40 , &H20 , &H1F , &H20 , &H40 , &H00 , &H00 'y
Data &H3F , &H41 , &H41 , &H41 , &H3F , &H00 , &H00 'o
Data &H3E , &H01 , &H01 , &H01 , &H3E , &H00 , &H00 'u
Data &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00
Data &H00 , &H02 , &H01 , &H01 , &H7E , &H00 , &H00 'J
Data &H3E , &H01 , &H01 , &H01 , &H3E , &H00 , &H00 'u
Data &H7F , &H01 , &H01 , &H01 , &H01 , &H00 , &H00 'l
Data &H00 , &H00 , &H7F , &H00 , &H00 , &H00 , &H00 'i
Data &H7F , &H49 , &H49 , &H41 , &H00 , &H00 , &H00 'e
Data &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 

Download all info in zip

I hope you enjoy this fun project.