Shop OBEX P1 Docs P2 Docs Learn Events
Max6954 — Parallax Forums

Max6954

Jan DvorakJan Dvorak Posts: 44
edited 2006-09-11 18:43 in BASIC Stamp
Have anybody tried to use dot-matrix controler MAX6952 with BS2? (datasheet: http://datasheets.maxim-ic.com/en/ds/MAX6952.pdf) I am not able to use it, I need help, preferably sample code. Can anyone help me, please? I don't even know, how to inicialize it ...
Thank you very much
«1

Comments

  • BamseBamse Posts: 561
    edited 2006-08-30 14:54
    Looks like a cool chip...

    I just ordered a couple of these and the MAX6953 as well...
    I'll give it a try and hopefully I could post some code next week...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Living on the planet Earth might be expensive but it includes a free trip around the sun every year...

    Experience level:
    [noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
    [noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
    [noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
    [noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
    [noparse][[/noparse] ] I dream in SX28 assembler...

    /Bamse
  • Jan DvorakJan Dvorak Posts: 44
    edited 2006-08-30 17:10
    It looks very good, but I think it is very difficult for control.
    And I am so sorry, I wrote into title MAX6954 instead of MAX6952.
  • BamseBamse Posts: 561
    edited 2006-08-30 17:56
    MAX6953 seem to have a I2C interface, if you have one of the stamps with I2C it might be easier to use one of those...
    The MAX6952 seem pretty straight forward, it's a SPI interface so you should be able to use this one with any stamp.

    Don't know if it helps but check out this article,
    http://www.parallax.com/dl/docs/cols/nv/vol2/col/nv70.pdf

    It uses a similar chip, that also uses a so called SPI interface.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Living on the planet Earth might be expensive but it includes a free trip around the sun every year...

    Experience level:
    [noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
    [noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
    [noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
    [noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
    [noparse][[/noparse] ] I dream in SX28 assembler...

    /Bamse
  • BamseBamse Posts: 561
    edited 2006-09-07 02:48
    Got the chips today and started to read the documentation...

    Turns out I need a few more components, let's hope the electronics shop has them...
    I'll stop by tomorrow and see if they can help me...

    If I only done my homework, I would probably been all hooked up by now... ;-)

    Anyhow, if you want me to do the math for you regarding Rset and Cset,·let me know two things...
    Are you planning of using 3.3V or 5V to drive the chip?
    If you are using 5V you need a resistor (R1)·to drop 5V to 3.3V in series with V+ and it needs to be calculated according to the documentation.
    How many 5x7 LED matrices·are you planning of using, 1, 2 or 4?
    Keep in mind each combination requires different components (R1, Rset and Cset).
    If you use 3.3V and 4 matrices, use Rset 53.6 Kohm and Cset 26pF as in the documentation.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Living on the planet Earth might be expensive but it includes a free trip around the sun every year...

    Experience level:
    [noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
    [noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
    [noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
    [noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
    [noparse][[/noparse] ] I dream in SX28 assembler...

    /Bamse
  • Jan DvorakJan Dvorak Posts: 44
    edited 2006-09-07 15:16
    I would like to use only three LED matrices .... supply voltage 5V. How can I calculate resitor R1, Rset and Cset? I haven't found it in datasheet.
  • Jan DvorakJan Dvorak Posts: 44
    edited 2006-09-07 15:18
    I hope it is possible use three matrices... where is written "1,2 or 4" as you wrote?
  • BamseBamse Posts: 561
    edited 2006-09-07 16:35
    The problem with Rset is that it limits the current for the the LEDs.

    I you use 1 or 2 matrices, this needs to be calculated on 20mA since that is what you normally send through one LED.
    For 4 matrices, this needs to be caluclated for 40mA since you now send 20mA through two LEDs at the same time.

    For three howerver, you need to use Rset for 20mA or you will blow the LED's in one matrix.
    This means one Matrix would be twice as bright as the other two...

    On the other hand, the documentation does mention that you can drive three matrices at the same time, however it doesn't mention HOW...
    I would use the bigger Rset for 20mA and give it a try first... If all the segments are dim and not one of them are brighter, go for it and try Rset for 40mA...

    Let me do some calculating and get back to you...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Living on the planet Earth might be expensive but it includes a free trip around the sun every year...

    Experience level:
    [noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
    [noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
    [noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
    [noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
    [noparse][[/noparse] ] I dream in SX28 assembler...

    /Bamse
  • Jan DvorakJan Dvorak Posts: 44
    edited 2006-09-07 18:04
    Thank you very much ... I am very confused now.
    Several years ago, I bought three matrix displays and now, the same type is not available. All matrix displays are very expensive in my country.
  • BamseBamse Posts: 561
    edited 2006-09-07 18:30
    Jan,

    I don't think my brain was properly connected when answering your post, sorry I confused you...
    For some reason I was trying to overcomplicate things and I realized 10 minutes after posting how wrong I was...

    If you are using, 1 or 2 matrices, you CAN recalculate everything for 20mA if you want to...

    For 5V and 3 matrices, use the values from the documentation.
    R1 = 3.3 Ohm, 1Watt. This will go from your 5V to pin 35, 36 and 37.
    Rset = 53.6 KOhm. Connect through pin 17 to ground.
    CSet = 26 pF. Connect through pin 24 to ground.

    The good news is that I just got the R1, Rset and CSet components so I'll be hooking this chip up tonight...

    Sorry to have confused you...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Living on the planet Earth might be expensive but it includes a free trip around the sun every year...

    Experience level:
    [noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
    [noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
    [noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
    [noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
    [noparse][[/noparse] ] I dream in SX28 assembler...

    /Bamse
  • Jan DvorakJan Dvorak Posts: 44
    edited 2006-09-07 21:07
    Bamse,

    OK, if your board with MAX6952/3 will work, could you show me your basic stamp code? Thank you very much
  • BamseBamse Posts: 561
    edited 2006-09-07 22:19
    Works fine...

    Here is the code...

    Do you care about code for MAX6953 ???

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Living on the planet Earth might be expensive but it includes a free trip around the sun every year...

    Experience level:
    [noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
    [noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
    [noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
    [noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
    [noparse][[/noparse] ] I dream in SX28 assembler...

    /Bamse
  • Jan DvorakJan Dvorak Posts: 44
    edited 2006-09-08 10:47
    Thank you very much, I have only MAX6952.
    That code is for 2 matrices, have you tried 3 or 4 matrices too? (I think as hardware - it is easy to edit PBASIC program)
  • Jan DvorakJan Dvorak Posts: 44
    edited 2006-09-08 12:16
    can I wire the data in/out this way? (see picture)
    786 x 390 - 8K
  • BamseBamse Posts: 561
    edited 2006-09-08 14:36
    Jan,

    To use three or four matrices, chage the following:
    MaxAdd = $03         'Dispaly digits
    MaxData = $00        'Just one.
    GOSUB send_Data
    
    


    To:
    MaxAdd = $03         'Dispaly digits
    MaxData = $01        'Three or four.
    GOSUB send_Data
    
    



    Regarding your schematics, that will not work.
    You need separate pins for DIN and DOUT.
    Since DOUT actually sends out data it will interfer with the data you are sending on DIN.

    I acutally read through the whole documentation yesterday and the program can be cut down quite a bit...

    I might even make an example of a user defined character, I'll post it if I get around doing it...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Living on the planet Earth might be expensive but it includes a free trip around the sun every year...

    Experience level:
    [noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
    [noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
    [noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
    [noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
    [noparse][[/noparse] ] I dream in SX28 assembler...

    /Bamse
  • Jan DvorakJan Dvorak Posts: 44
    edited 2006-09-08 14:52
    Thank you for all, so:
    - you think that three matrices are possible (not only 1,2 or 4)
    - R1 = 3.3 Ohm/1W - is it necessary??? operating voltage is 2,7V-5,5V
    - Rset = 53.6 KOhm
    - Cset = 26 pF
    - necessary separate DIN and DOUT

    I would be grateful to you for any sample code, and particularly user defined character - I will need it surely.

    Thank you
    Jan
  • BamseBamse Posts: 561
    edited 2006-09-08 15:24
    Jan,

    You can try without the 3.3 Ohm if you want to, just read page 18 in the MAX6952 documentation first...
    Just be carefull not to burn out the chip...
    Try it for a minute or two, if the chip is getting warm/hot, you will probably need a resistor...
    MAX6952 Datasheet said...

    The voltage drop across the drivers with a nominal 5V
    supply (5.0V - 2.4V) = 2.6V is nearly 3 times the drop
    across the drivers with a nominal 3.3V supply (3.3V -
    2.4V) = 0.9V. In most systems, consumption is an
    important design criterion, and the MAX6952 should be
    operated from the system’s 3.3V nominal supply. In
    other designs, the lowest supply voltage may be 5V.
    The issue now is to ensure the dissipation limit for the
    MAX6952 is not exceeded. This can be achieved by
    inserting a series resistor in the supply to the MAX6952,
    ensuring that the supply decoupling capacitors are still
    on the MAX6952 side of the resistor. For example, consider
    the requirement that the minimum supply voltage
    to a MAX6952 must be 3.0V, and the input supply
    range is 5V ±5%.
    Maximum supply current is:
    12mA + (40mA x 10) = 412mA
    Minimum input supply voltage is 4.75V.
    Maximum series resistor value is:
    (4.75V - 3.0V) / 0.412A = 4.25Ω
    We choose 3.3Ω ±5%. Worst-case resistor dissipation
    is at maximum toleranced resistance, i.e., (0.412A) 2 x
    (3.3Ω ✕ 1.05) = 0.577W. We choose a 1W resistor rating.
    The maximum MAX6952 supply voltage is at maximum
    input supply voltage and minimum toleranced
    resistance, i.e., 5.25V - (0.412A x 3.3Ω ✕ 0.95) = 3.97V.
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Living on the planet Earth might be expensive but it includes a free trip around the sun every year...

    Experience level:
    [noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
    [noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
    [noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
    [noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
    [noparse][[/noparse] ] I dream in SX28 assembler...

    /Bamse
  • Jan DvorakJan Dvorak Posts: 44
    edited 2006-09-08 15:34
    Okay, thank you for explanation.
    One more qustion - I have not 26pF, can I use 33pF? What is this capacitor for?
  • BamseBamse Posts: 561
    edited 2006-09-08 16:30
    I used 22pF and 56KOhms and that worked well...

    Cset 33pF should be fine, if you use the blink function it might blink a little bit slower since the chip is now running around 3MHz in stead of 4MHz..

    The combination of Cset and Rset will determine your Frequency...
    MAX6952 Datasheet said...

    Selecting External Components RSET and
    CSET to Set Oscillator Frequency and
    Segment Current
    The RC oscillator uses an external resistor RSET and an
    external capacitor CSET to set the oscillator frequency,
    fOSC. The allowed range of fOSC is 1MHz to 8MHz.
    RSET also sets the peak segment current. The recommended
    values of RSET and CSET set the oscillator to
    4MHz, which makes the blink frequencies 0.5Hz and
    1Hz. The recommended value of RSET also sets the
    peak current to 40mA, which makes the segment current
    adjustable from 2.5mA to 37.5mA in 2.5mA steps:
    ISEG = KI / RSET mA
    fOSC = KF / (RSET ✕ CSET + CSTRAY) MHz
    Where:
    KI = 2144
    KF = 6000
    RSET = external resistor in kΩ
    CSET = external capacitor in pF
    CSTRAY = stray capacitance from OSC pin to GND in
    pF, typically 2pF
    The recommended value of RSET is 53.6kΩ and the
    recommended value of CSET is 26pF.
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Living on the planet Earth might be expensive but it includes a free trip around the sun every year...

    Experience level:
    [noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
    [noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
    [noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
    [noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
    [noparse][[/noparse] ] I dream in SX28 assembler...

    /Bamse
  • Jan DvorakJan Dvorak Posts: 44
    edited 2006-09-08 18:46
    In my basic stamp 2p24 is also parallel LCD display, which occupy 7 pins. If data pins have to be separated, can I use the same pins for LCD (DB4-7) and Data pins on MAX6952?
  • BamseBamse Posts: 561
    edited 2006-09-08 19:35
    Good question... wink.gif

    I would not recomend it since we don't know if the internal wiring in the LCD display or MAX6952 will cause problems.
    Worst case you could break one of the devices.
    That said, you might be able to use these as long as you only send data to one device at the same time...
    Make sure CS has it own pin though and do not connect DOUT to anything.
    If you do need DOUT, give it a pin of it's own.
    Ask youself, is it worth the risk to save two pins but risk breaking one device?

    Here is also one example with custom characters.
    It's actually cycling through two chars in an infinte loop.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Living on the planet Earth might be expensive but it includes a free trip around the sun every year...

    Experience level:
    [noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
    [noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
    [noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
    [noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
    [noparse][[/noparse] ] I dream in SX28 assembler...

    /Bamse
  • Jan DvorakJan Dvorak Posts: 44
    edited 2006-09-09 07:43
    Do I need the pin Data_out (on MAX6952)? In both your sample codes, you use Data_in, but not Data_out. If I would wire it with GROUND and not to use it, is there any problem?
  • BamseBamse Posts: 561
    edited 2006-09-09 15:46
    Data out is used if you want to read data from the chip or connect two or more chips together...

    If not used, just leave it floating (not connected).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Living on the planet Earth might be expensive but it includes a free trip around the sun every year...

    Experience level:
    [noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
    [noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
    [noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
    [noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
    [noparse][[/noparse] ] I dream in SX28 assembler...

    /Bamse
  • Jan DvorakJan Dvorak Posts: 44
    edited 2006-09-09 15:58
    what data can I read from chip?
    By the way - what country are you from? I ask you because you often respond in the same time as I do.
  • BamseBamse Posts: 561
    edited 2006-09-09 20:18
    Jan,

    I live in the US but I'm from Sweden...

    Where are you from???

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Living on the planet Earth might be expensive but it includes a free trip around the sun every year...

    Experience level:
    [noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
    [noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
    [noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
    [noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
    [noparse][[/noparse] ] I dream in SX28 assembler...

    /Bamse
  • Jan DvorakJan Dvorak Posts: 44
    edited 2006-09-09 21:05
    Bamse,

    image in my profile is the national emblem of my country. Try to guess smile.gif

    I am from Czech Republic, it is small country in the centre of Europe, not so far from Sweden. Many electronic components are badly available and very expensive here.
    I found in my small workshop three dot-matrices, so I tried to order MAX6952 as samples - successfully. It was very very difficult to get BS2p24 in my country.
    In US (Sounth Dakota) and Canada (Vancouver) I have many relatives. I know Sweden, very nice place.
    Excuse my bad English please, it is not my vernacular.

    Jan
  • Jan DvorakJan Dvorak Posts: 44
    edited 2006-09-09 21:09
    And one more question about MAX6952 - is it possible to make scrolling text?
  • BamseBamse Posts: 561
    edited 2006-09-11 14:46
    Jan,

    I've been to Prauge on bussiness a couple of times, very beautiful city...
    And the beer is a lot better than the beer here in the US... wink.gif

    I'm sorry to say that there is no built in function to scroll the text.
    You can probably write some code to do it, but I don't think it's a trivial task.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Living on the planet Earth might be expensive but it includes a free trip around the sun every year...

    Experience level:
    [noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
    [noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
    [noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
    [noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
    [noparse][[/noparse] ] I dream in SX28 assembler...

    /Bamse
  • Jan DvorakJan Dvorak Posts: 44
    edited 2006-09-11 15:56
    Bamse,
    Prague is really very beautiful, I live about 70 miles (110km) far from Prague. Next year, I am going to attend Technical University in Prague. I am glad that you like czech beer, when my relatives from Vancouver came to Czech Republic, they drank a beer every evening, although they don't drink an alcohol normally. smile.gif According to tourists, Prague is one of the most beautiful city in Europe.
    I am glad that I can practise English, thanks to this forum and of course you. I just hope you understand me.
    It is a pity that this LED driver prohibits to scroll the text - I have some idea how to make that, but there is a trouble that I would fill up all variables in PBASIC - for each column has to be one BYTE variable.
    If you would write some code for anythink (not only scrolling text), I would be very very grateful to you.
    Thank you very much

    Jan
  • Mike GreenMike Green Posts: 23,101
    edited 2006-09-11 16:16
    Jan,
    If your text doesn't change often (like once every minute at most), you could store the text in the EEPROM using the READ and WRITE statements, then write a portion of the text to the LED driver perhaps twice a second. That could make it scroll and allow for an arbitrarily long text string.

    The only concern is that any location in EEPROM can only be written about 100000 times. If it only changes once a minute, that location could "wear out" in 3-4 months of continuous use. If the text changes less often than that, the memory location would last longer. If you're trying to make a display sign where the message may change only once a day, then don't worry about the "wearing out".
    Mike Green
  • Jan DvorakJan Dvorak Posts: 44
    edited 2006-09-11 16:26
    Mike, it is very nice idea. Thank you a lot! I could retaint used chatacters (mainly numbers) in external serial (or DALLAS 1-wire) EEPROM and read it all. Internal Stamp EEPROM I use for another think yet.
Sign In or Register to comment.