Bi-Color matrix

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

Moderators: Chuckt, Garth, bitfogav

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: Bi-Color matrix

Post by MrDEB » Wed Oct 24, 2012 10:41 pm

I don't see any ghosting but will look into it further. Am thinking that the LEDs are brighter and it just appears tat way.
I am pondering increasing the LED current (in video = 14ma per) to 20-22ma but wondering if scanning very fast might help?
The experiment I did (see the TLC5916 post) I might go with that but have to take into consideration battery life etc.
Also hoping to get the BRIGHTER led Matrix soon from Kingbright.

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: Bi-Color matrix

Post by brad » Thu Oct 25, 2012 9:30 pm

You would want to be scanning 25 times per second to get rid of any flicker :)

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: Bi-Color matrix

Post by MrDEB » Mon Oct 29, 2012 2:05 pm

I wouldn't call it really scanning.
here is the code for right arrow across the matrix. Found using Y and z to adjust the DELAYMS(). If you look at the video I posted you will see what the output look like. would it look better or less current if I "scaned" each arrow section at say 25 times per section? If I am using this correctly, I am just turning on each ROW with corresponding led colums then advancing the ROWs.

Code: Select all

Sub RIGHT()
y=10
z = 30    
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
// first arrow
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
For x = 0 To 14
                  PORTC = Red_Data(0)
     PORTD = R_ows(0)
     DelayMS(y)
                  PORTC = Red_Data(1)
     PORTD = R_ows(1)
     DelayMS(y)
                  PORTC = Red_Data(2)
     PORTD = R_ows(2)
     DelayMS(y)
Next
     DelayMS(z)
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
     // second arrow
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
For x = 0 To 14
                  PORTC = Red_Data(0)
     PORTD = R_ows(1)
     DelayMS(y)
                  PORTC = Red_Data(1)
     PORTD = R_ows(2)
     DelayMS(y)
                  PORTC = Red_Data(2)
     PORTD = R_ows(3)
     DelayMS(y)
Next
      DelayMS(z)
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
// third arrow
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
For x = 0 To 14
                  PORTC = Red_Data(0)
    PORTD = R_ows(2)
     DelayMS(y)
                  PORTC = Red_Data(1)
    PORTD = R_ows(3)
    DelayMS(y)
                  PORTC = Red_Data(2)
    PORTD = R_ows(4)
     DelayMS(y)
Next
      DelayMS(z)
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
//fourth arrow
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
For x = 0 To 14     
                  PORTC = Red_Data(0)
    PORTD = R_ows(3)
     DelayMS(y)
                  PORTC = Red_Data(1)
    PORTD = R_ows(4)
     DelayMS(y)     
                 PORTC = Red_Data(2)
    PORTD = R_ows(5)
     DelayMS(y)
Next
      DelayMS(z)
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
// fifth arrow
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
For x = 0 To 14     
                 PORTC = Red_Data(0)
    PORTD = R_ows(4)
    DelayMS(y)
                  PORTC = Red_Data(1)
    PORTD = R_ows(5)
    DelayMS(y)     
                 PORTC = Red_Data(2)
    PORTD = R_ows(6)
    DelayMS(y)
Next
   DelayMS(z)                 
           
End Sub

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: Bi-Color matrix

Post by brad » Tue Oct 30, 2012 8:19 pm

It still seems that you are going about it in a very convoluted way.

Have you received the matrix and circuit boards I sent you? I'd be very interested to see you get my circuit going with my code to hopefully help steer you in the right direction.

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: Bi-Color matrix

Post by MrDEB » Tue Oct 30, 2012 8:59 pm

Haven't seen any packages yet but will let you know as soon as I get it.
As far as convoluted? it appears to work pretty good but open for suggestions.
Contemplating using the constant sink component but want to get this prototype done first. Adding a wireless then insert an interrupt into the code.

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: Bi-Color matrix

Post by brad » Wed Oct 31, 2012 10:35 pm

What is the wireless and interrupt going to be used for?

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: Bi-Color matrix

Post by MrDEB » Thu Nov 01, 2012 3:22 am

The wireless (http://multyremotes.com/four-channel-ASK-remote.htm) will transmit which one of three(might be just 2) switch is closed to tell the PIC which LED pattern to display (RIGHT, LEFT, STOP?)
The interrupt is triggered by the receiver VT pin while the data pins tell which pattern.
Have a schematic that I need to look over again but will post.

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: Bi-Color matrix

Post by MrDEB » Thu Nov 01, 2012 4:42 am

Here is a diptrace file of the schematic so far.
Its a compressed file
Attachments
new bike dip pakw_test.zip
(11.84 KiB) Downloaded 442 times

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: Bi-Color matrix

Post by brad » Thu Nov 01, 2012 6:05 pm

I was experimenting with wireless devices a couple of years ago but didn't ever really finish anything with it.

What type of bike is the project for exactly?

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: Bi-Color matrix

Post by MrDEB » Thu Nov 01, 2012 9:24 pm

ANY bike-cycle and if I add a couple of Mosfets to the mix it could be used on a motorcycle where the PIC circuitry is connected to the bikes turn signals.
Need to get the prototype all done (the matrix looks good but still wondering about using the constant sink chips (TLC5916) in place of the ULN2803's. THEN I could up the LED current using only one resistor instead of 10. BUT using the code I posted I would need to perhaps scan the rows instead of just turning off and on as it is now. BIG question-- will it conserve battery life? Would make for a brighter display but worth it??
I need to do some experimenting with actual parts and a DMM.
Right now am waiting on the HT12E and HT12D chips so I can experiment w/ the remote/ switches and interrupt.
Taking it one step at a time.

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: Bi-Color matrix

Post by MrDEB » Fri Nov 02, 2012 7:12 am

Am attempting to configure the TLC5916 into my code BUT I need to output serial data from the pic to the TLC5916. Using the posted code which puts the anodes HIGH but the const arrays are inputting 8bit bits. How to convert 8bit bytes into serial???
Presently the const array data is loaded ubto the portA.0 to A4
HOW to get all the data on the port pins out to serial format.

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: Bi-Color matrix

Post by brad » Fri Nov 02, 2012 7:27 am

To output the data serially you just want to access a specific bit in your byte. So let's say you want to send out eight bits contained within a byte named MyData to PORTB pin 0, you would do something like this:

Code: Select all

for x = 0 to 7
     PORTB.bits(0) = MyData.bits(x)
next
Of course you would need to latch onto the information as you send it through so you would need to add some sort of clock pulse to the receiving circuit, perhaps like this (where PORTB pin 1 is the clock pin):

Code: Select all

for x = 0 to 7
     PORTB.bits(0) = MyData.bits(x)
     PORTB.bits(1) = 1
     PORTB.bits(1) = 0
next

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: Bi-Color matrix

Post by MrDEB » Fri Nov 02, 2012 11:26 am

I figured there must be an easy method and the example you posted looks like what I was kinda thinking but was going to look at more code examples
THANKS
will let you know how the TLC5916 experiments go

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: Bi-Color matrix

Post by MrDEB » Fri Nov 02, 2012 11:30 am

Is portb.1=0 the same as
portb.bits(1) = 0
the same thing??
why the bits??

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: Bi-Color matrix

Post by brad » Sat Nov 03, 2012 8:45 am

If you want to assign something to an individual port pin, you need to write it as:

Code: Select all

PORTB.bits(1) = 0
if you try and leave out the .bits, it will just give you an error and won't compile.

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

Who is online

Users browsing this forum: No registered users and 13 guests