Shop OBEX P1 Docs P2 Docs Learn Events
Bs2 and futurlec DOT MATRIX — Parallax Forums

Bs2 and futurlec DOT MATRIX

NJMNJM Posts: 3
edited 2007-06-07 04:07 in BASIC Stamp

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.shtmlsmilewinkgrin.gif But the datasheet was in Tai·mad.gif. 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

  • Desy2820Desy2820 Posts: 138
    edited 2007-05-23 10:59
    Your right, the datasheet is hard to understand, but it looks this is not an "intelligent" device.·

    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
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2007-05-23 11:44
    Thanks for the good find. I have created a few LED moving display projects with the BS2, SX chips on this forum. ·I have been waiting for something "pre-built" for a while to come along. I will order 1 or 2 and give it a shot. I will post my findings. It may take me a while to figure this out but I will be determined.

    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.
  • Desy2820Desy2820 Posts: 138
    edited 2007-05-23 11:53
    I really wish I could find a translated data sheet.· I don't see how you can access the whole display if the clock lines·work as I described above.

    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
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2007-05-23 12:16
    Here is example code from the thai website.
    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
  • NJMNJM Posts: 3
    edited 2007-05-23 18:03
    Thanks·for your support

    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 shocked.gif· 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 confused.gif ??
    ·
    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
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2007-05-23 22:07
    I saw both of your AVI video's. Was this the effect you were trying to achieve (as it seemed to move a bit slow)? Did you write this code for the BS2? If so, can you post it? You mention DEMO code? How was this code implemented?

    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.
  • NJMNJM Posts: 3
    edited 2007-05-24 03:50
    No this is not what i was I trying to achieve, it occur when I low the latch and strobe. For the Demo cod I was pointing to the Attachment Posted by “Peter Verkaik
    ·
    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.
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2007-06-02 20:41
    I received the 16x32 display board today. It is small !!

    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.
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2007-06-02 23:00
    After seeing almost 1 AMP being drawn from my Professional Development Board (5A regulator but only 1 Amp 7.5vdc wall transformer that gets regulated to 5vdc at 1 Amp)...I thought I should play it safe since you said with all LEDs on it gets to be 2.5 - 3 Amps.

    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
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2007-06-03 16:47
    I was able to follow some example code from a 74HC595 LED sequence code and got it to work - at least partially. I have tried various sequences in placing the SHIFTOUT statments and what I have currently is the best layout yet.

    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.
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2007-06-07 04:07
    After not being able to sucessfully do this with SHIFTOUT statements for either PBASIC (BS2) or SX/B (SX-28), I re-examined some of the·almost non existant amount·of·PIC C code I could find on the web that relates to this AD-801-B LED Display (with 3 LC7932M ICs). I am not a C programmer and tried to figure it out the best I could with what I know about PBASIC and SX/B.

    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.
Sign In or Register to comment.