Bs2 and futurlec DOT MATRIX
NJM
Posts: 3
Hello ever body, this is my first post and II hope someone can help me?
·
A week a go I get my 16X32 DOT MATRIX led display from “http://www.futurlec.com/Specials.shtml” But the datasheet was in Tai·. I tried writ a simple program and run it on bs2 homework board.
·
But the display start to generate it on animation, even after BS2 stop running “it generate new animation every time I reset BS2”. When I try to pull down the data pins nothing is shown o the LED MATRIX, also I get the same result when I disconnect the power from BS2 board “I have different power supply for the LED and BS2” ···
·
Any body can help me to understand what I did wrong!! ·
·
-- this the programe I run --
' {$STAMP BS2}
' {$PBASIC 2.5}
' {$PORT COM8}
·
·
LOW 5
LOW 6
SHIFTOUT 4, 1, 0, [noparse][[/noparse]%1000000110000000]
SHIFTOUT 4, 2, 0, [noparse][[/noparse]%1001001001001001]
SHIFTOUT 4, 3, 0, [noparse][[/noparse]%0110110110110110]
·
END
Comments
First up, since you're using seperate power supplies, make sure that you securely connect the two negative power supply sides together.· This is important.· Second connect the Stamp's power supply to the "VCC IC" of the display.· The LED supply should connect to "VCC LED."· Connect the negatives from both supplies to the display's "GND."· Are you sure your LED supply can output enough current?
Second, I don't think you can use the "SHIFTOUT" command, as I think the display needs the clock line pulsed to latch the data· Try thinking of it as three serial to parallel shift registers.· Connect the three SIN1, SIN2 and SIN3 display pins to seperate pins on the BS2 and use resistors in between the display and Stamp, start with say, 1,000 ohms.· Three resistors total.
Basically, you need to set the three SIN1-SIN3 pins properly, then pulse the clock line.· Repeat 16 times for the whole display.· This should display your first pattern.· Then you need to go on to your next pattern.· Try using Excel or graph paper to see how to lay out each dot, then translate that to a pattern.
I think you need to do something like this:
CLOCK PIN X
LOW CLOCK
LOW·5 'I assume this connects·to the latch of display
LOW 6 'I assume this connects to the strobe of display
'Set up the three pins: (SIN1 to SIN3)
HIGH 1 'assuming SIN1 connects to PIN 1, change as you need.
HIGH 2 'assuming SIN2 connects to PIN 2
HIGH 3 ' etc
TOGGLE·CLOCK 'Switches clock from low to high or high to low, must be previously set properly
TOGGLE CLOCK 'Sets it back to where it was
'Now set up for the next group:
HIGH/LOW SIN1
HIGH/LOW SIN2
HIGH/LOW SIN3
Repeat 16 times for the first·pattern.
PAUSE 250 'gives you time to see the LEDS, you may need to change up or down.· While testing, I'd just loop thru once to make sure I have the pattern right, then test the next pattern seperately, until I had them all working.·
It'll be frustrating, but keep at it you'll get it.· You may also need to use the latch/strobe inputs to blank the display until you can get the pattern shifted out to it completely, then unblank it to display the pattern.
I hope this helped!
Once you start to figure out how this works, then I would also consider using an array or series of "DATA" statements to hold the patterns.· Then your code just has to read them out.
Post Edited (Desy2820) : 5/23/2007 11:26:29 AM GMT
How do the displays look? Since it doesn't appear to use any high current components (at least not what I can tell) it is probably all done internally like the MAX7219 is. Did you have to any any external components besides a BS2?
Thanks again.
How do you get ROW 1, COL 2?· If I'm correct, then each time the clock pulses, it loads all three shift registers, but then you could only get to ROW 1, COL 1; ROW 2, COL 2; etc.· It can't work properly this way.· You may need to play with the clock and SIN lines and see how they actually work.
Sorry.
Post Edited (Desy2820) : 5/23/2007 12:05:56 PM GMT
Luckily the demo program is in C, with compiled asm listing.
You should be able to transform that into pbasic or sx/b.
regards peter
I will keep trying to figure out how it works. I had written datasheet in excel to get the binary array; it is something similar to the one “Desy2820” Attached,
·
The LED consume 2.5A to 3A when flashing all the led · I measured the current when it generates its on animation. ·
·
I use ULN2004 to isolate the LED display from BS2, also I try to run it direct from BS2 I/O pins.
·
I am thinking to use an external clock NE555 time. And use serialout with the SIN lines, Will this going to work ??
·
If I have time, today I will start transforming the demo program to pbasic
·
Bye the way I can not Attach excel , or video files, so I used “quicksharing” ··
·
·
The excel I have written
http://s19.quicksharing.com/v/1968268/101.xls.html
·
The Animation generated by the LED when I remove the pull down resistor, and run my program····
http://s19.quicksharing.com/v/1196443/Video_1.avi.html
http://s19.quicksharing.com/v/2711479/Video_2.avi.html
You do not need to use the ULN2004. This chip provides 7 "inverted" higher current outputs (500 mA) per output. Since it is inverted and not going directly to the LEDs, it wont provide much benefit. From what I understand, the BS2 or other microcontroller gets connected to the onboard driver chips (LC7932). If it was possible, it would have been better to have used the ULN2004 on the cathode LEDs (so you can provide a positive in and get a negative output to the cathodes). However, I think you may be using this for the wrong purpose so a ULN2004 or a better choice is ULN2803 (8 outputs not 7 outputs like the ULN2003 / ULN2004) is not needed. I beleive the LC7932 chips will take care of driving the LEDs.
You should not need to use a 555 timer chip either. The BS2 can provide a clock out with simple HIGH and LOW statements.
I can't review this much further until my 16x32 board comes in to me in a week or so. I will probably develop it with a BS2 or maybe also an SX28 protoboard for it's speed factor.
Keep us posted on your progress - as will I.
Thanks.
·
Yes, you are right; I don’t need to use ULN2003/ULN2004. I removed it, and connected the display direct to BS2. using 555 timer was only·a thought popup in my mind..
·
I’m going try it tonight on PIC18F458, with my friend as I have the Demo program, to understand how it work. “I look at the program and it looks not so tricky”
·
I will Keep posted on the progress.
I have found almost nothing on documentation (at least not in english). I will have to rely mainly on the LED driver datasheet. I can't beleive the included CD-R did not have nothing more than a poorly put together datasheet.
Anyway, I have it wired up (soldered 8 wires on the AD-501-B) to a BS2 (wires are run to 6 I/O pins). I did·solder the LED Vcc and the LED driver IC Vcc together on the AD-501-B board to allow only 8 wires to come off of it instead of almost 11.
I am using my Professional Development Board (PDB) with the standard 7.5vdc 1 A p/s (regulated to 5vdc on the PDB).
While I am figuring this out...Can you attach any current code you have so I can look it over to save time and confirm some connections?
Thanks.
I decided to use my BS2 ·Board of Education (rev c) but this only has a 1 Amp regulator so I was not much better off. As not to take any chances of ruining a more expensive PDB versus a BOE, I used the·BOE but used a 5vdc 20 Amp power supply I bought on Ebay. It is·pretty well·regulated and somewhat adjustable if need be. The 5vdc 20A p/s is wired into Vin and Vss (not Vdd and Vss).
I was able to·again check for a current drain but only got 1.45 Amps·will all 512 LEDs on not the 2.5·- 3 Amps as you stated.
How did you measure this much current?
I re-wired it again this time using the 5vdc 20A p/s for the LEDs VCC connection and ground tied to the other ground on the BOE. I am also using the standard 1 A p/s for the BOE going to Vdd and Vss·(nothing to Vin).
Anyway, I am able to see the same kind of patterns that you originally saw. I would like to see if you have been working on any code so save some research time. Let me know. Here is the code I have been using. It doesn't do much other than that.
Here is my next question...Since I was drawing almost an amp, from the normal 1 Amp p/s (using Vdd and Vss) - does anyone feel this is still ok to do or will I blow components?
I'm thinking I should continue to use the Vin (5vdc 20A) approach for the LEDs and the BOE p/s for the BOE and IC Vcc - but it is a bit of a pain to use this large power supply.
Thanks.
Post Edited (T&E Engineer) : 6/2/2007 11:59:14 PM GMT
I can only get the top·8 rows of SIN_1 to work and only the first 8·columns of both SIN_2 and SIN_2 to display LED sequence patterns.
Any help would be appreciated. I have attached my updated code.
Thanks.
I have posted some very·simple code that scrolls a pattern down the display. There has to be an easier way to do this. But from what I can tell from the various sources of C code, this is what everyone seems to be doing in the basic layout.
If anyone can clean this up a bit, maybe use READ DATA statements, that would be great!
I will continue to work on it to get more advanced things happening. However, this is yet another good challenge for me to take on.
Thanks.