One Chip RGB POV Display instructable online!

Post here to let others know of a project you're working on.

Moderators: Chuckt, Garth, bitfogav

Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

One Chip RGB POV Display instructable online!

Post by brad » Mon Feb 14, 2011 11:53 am

Hi everyone,

I have been busy working on an instructable that shows you how to create my latest project - an eight LED RGB POV display that is capable of displaying text, graphics and animations. I have also come up with a couple of VB.NET applications which allow you to import your own graphics, the software will then convert the graphic into 3-bit colour and export the code for you to paste into swordfish basic. You just need to compile it and program to the microcontroller. No coding required!

The display can scroll a large image from top to bottom, or it can scroll a long image from right to left.

here is the instructable link:
http://www.instructables.com/id/The-One ... ith-conve/

Here is a photo of the display running in scroll left mode:
Image

here is a photo of the display running in 'scroll down' mode (it is displaying eight vertical pixels of the image to the right)
Image

And here is a photo showing what the display would look like if you had alot of LED's:
Image

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Re: One Chip RGB POV Display instructable online!

Post by bitfogav » Tue Feb 15, 2011 3:55 am

You've got my vote on instructables Brad :)

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: One Chip RGB POV Display instructable online!

Post by brad » Tue Feb 15, 2011 9:13 pm

Thanks bitfogav!

If I win one of the 1st prizes, i'll be going on a sparkfun shopping spree!

MrDEB
I practically live here!
I practically live here!
Posts: 372
Joined: Fri Feb 18, 2011 4:24 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: One Chip RGB POV Display instructable online!

Post by MrDEB » Sun Feb 20, 2011 10:29 pm

Is there a FREE download of VB?
SF code for this project? I downloaded the files from INSTRUCTABLES but ?
Hopefully I can download all required code etc.

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: One Chip RGB POV Display instructable online!

Post by brad » Mon Feb 21, 2011 5:01 am

You can download VB.Net for free (It is called Visual Studio Express)

http://www.microsoft.com/express/Downlo ... sual-Basic

As for the code, I didn't post any code anywhere because the software generates the code for you depending on what picture you have converted. But here is some example code that will scroll through the super mario bros image:

Code: Select all

//////////////////////////////////////////////////////////////////////////////
// The One Chip Spinning POV Display - SCROLL UP CODE                                     //
//////////////////////////////////////////////////////////////////////////////
// By Brad Slattery 2011                                                                                         //
// www.bradsprojects.com                                                                                     //
//                                                                                                                           //
// Philippians 4v13; I can do all things through Christ who strengthens me.            //
//////////////////////////////////////////////////////////////////////////////

Device = 18F4680          // Tell the compiler what chip we are using
Clock = 8                // Tell the compiler what we will be setting the clock to (Mhz)           
Config OSC = IRCIO67     // This tells the microcontroller to use the internal clock 

Include "utils.bas"

// Arrays                                                                                    
const RedData(2592) as byte = ' I HAVE HAD TO LEAVE OUT THIS DATA BECAUSE THERE IS TOO MUCH TO FIT IN THE FORUM
const GreenData(2592) as byte = ' I HAVE HAD TO LEAVE OUT THIS DATA BECAUSE THERE IS TOO MUCH TO FIT IN THE FORUM
const BlueData(2592) as byte = ' I HAVE HAD TO LEAVE OUT THIS DATA BECAUSE THERE IS TOO MUCH TO FIT IN THE FORUM

// variable declaration 
Dim ShiftRight As Word  
Dim StartShiftRight as word
Dim Width As Word 
dim StartWidth as word
Dim x As word
Dim ShiftLeft As Word
dim StartShiftLeft as word
Dim LineCounter As Word
Dim StartLineCounter as word 
Dim RefreshCounter As Byte
dim StartRefreshCounter as byte
Dim DataOutRed As Byte 
Dim DataOutGreen As Byte
Dim DataOutBlue As Byte
Dim DataOutRedNext As Byte 
Dim DataOutGreenNext As Byte
Dim DataOutBlueNext As Byte
Dim OutputRed As Byte   
Dim OutputGreen As Byte
Dim OutputBlue As Byte
dim AnimationHeight as word
Dim LedHeight as byte
dim DelayOn as word
dim DelayOff as word
dim AnimationSpeed as byte

// Sub Routines
Sub DisplayGraphics()
    For x = (Width - StartWidth) To (Width - 1)
        DataOutGreen = GreenData(x) << ShiftLeft
        DataOutRed = RedData(x) << ShiftLeft
        DataOutBlue = BlueData(x) << ShiftLeft
        DataOutGreenNext = GreenData(x + startwidth) >> ShiftRight
        DataOutRedNext = RedData(x + startwidth) >> ShiftRight
        DataOutBlueNext = BlueData(x + startwidth) >> ShiftRight
        OutputRed = DataOutRed Or DataOutRedNext
        OutputBlue = DataOutBlue Or DataOutBlueNext
        OutputGreen = DataOutGreen Or DataOutGreenNext
        PORTD = OutputRed
        PORTB = OutputBlue
        PORTA = OutputGreen
        PORTE.bits(0) = OutputGreen.bits(6)
        PORTE.bits(1) = OutputGreen.bits(7)
        DelayUS(DelayOn)
        PORTA = 0 
        PORTB = 0
        PORTD = 0
        PORTE = 0
        DelayUS(DelayOff)
    Next
    RefreshCounter = RefreshCounter + 1
    If RefreshCounter = AnimationSpeed Then
    	LineCounter = LineCounter + 1    
    	ShiftLeft = ShiftLeft + 1
    	ShiftRight = ShiftRight - 1
    	RefreshCounter = StartRefreshcounter
    EndIf
    If ShiftLeft = LedHeight Then
    	width = width + startwidth
    	ShiftLeft = StartShiftLeft
    	ShiftRight = StartShiftRight
    EndIf
    If LineCounter = (AnimationHeight - (ledheight - 1)) Then
    	LineCounter = StartLineCounter
    	ShiftLeft = StartShiftLeft
    	ShiftRight = StartShiftRight
    	WIDTH = STARTWIDTH
    	RefreshCounter = StartRefreshCounter
    EndIf        
End Sub

// Start Of Program
OSCCON = %01111111                  // Sets the internal oscillator for 8Mhz
SetAllDigital                       // Make all Pins digital I/O's
TRISD = %00000000                   // Make PORTD all outputs
TRISB = %00000000                   // Make PORTB all outputs
TRISC = %00000000
TRISA = $00000000
TRISE = %00000100
PORTA = %00000000           
PORTB = %00000000
PORTC = %00000000
PORTD = %00000000 
PORTE = %00000000

StartLineCounter = 0
StartShiftLeft = 0
StartShiftRight = 8
LedHeight = 8 
StartRefreshCounter = 0


StartWidth = 96
AnimationHeight = 216
DelayOn = 40
DelayOff = 15
AnimationSpeed = 2

shiftleft = Startshiftleft
shiftright = Startshiftright
WIDTH = StartWIDTH
LineCounter = StartLineCounter
RefreshCounter = StartRefreshCounter

// Main Loop
While True()                        // This creates an infinite loop
    If PORTE.bits(2) = 0 Then
    DisplayGraphics
    EndIf
Wend                                // Loop back to the while loop as long as we havent finished.

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Who is online

Users browsing this forum: No registered users and 12 guests