View Full Version : MAX6953 and Prop communication

01-07-2009, 01:13 AM
1. Can the max 6953 be used with a "DIY" matrix?
2. Are there any better options to control a "DIY" matrix?
3. Am I on the right track with the code below (any obvious problems with it)?

I've got a MAx6953 [LINK (http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3291) | Datasheet (http://datasheets.maxim-ic.com/en/ds/MAX6953.pdf)] hooked up to the prop. My goal is to create a scoreboard out of leds (aprox. 8000 leds involved). I've ported some arduino/I2C code over for my application to get this thing to work (Code below). However, no matter what I do I can't get it to work. The max chip is a 5x7 led controller...now does this mean I have to buy a LED matrix like this [LINK (http://www.futurlec.com/LEDMatrix.shtml)] to make it work? Up to now I've never seen anyone using a "DIY" matrix. I've made my own matrix following the schematic on the max datasheet.


Here's the code I've ported over from this post [LINK (http://www.electro-tech-online.com/micro-controllers/85018-max6953-input.html)]

_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
long config_byte
long device_address
long tempd
i : "i2c"
s : "FullDuplexSerialPlus"

PUB Main
if(i.init(15,14,false)) ' turn on a led when I2C is initialized

Shutdown(false,true)'disable shutdown mode
SetIntensity(15) 'set intensity to the highest
DisplayTest(true) ' Turn on all leds

repeat ' debug led just to make sure it's working/running

PUB SetDeviceAddr(addr)
addr += $50 'MAX6953 addresses take the form 101xxxx
device_address := addr 'where xxxx is the user-selected address 0-15

PUB DisplayTest(state)
'Put the display in test mode. Will illuminate all LEDs if state=TRUE
'Does not affect plane data - original display is restored when set FALSE

PUB Shutdown(state, wrt)
'Put the display into/out low power 'shutdown' mode
config_byte:=config_byte &= $FE
config_byte:= config_byte |= $01

PUB WriteConfigRegister(reg)

PUB GetAddr : myaddr
'device_address:= (device_address <<1) & $FE
'return device_address
return (device_address <<1) & $FE

PUB SetIntensity(inten)
' Set the display intensity from 0-15
tempd := inten<<4 ' set the most significant nybble
i.i2cWrite($01,8) ' first intensity register
i.i2cWrite(inten,8) ' register addr autoincrements, so write second reg

I've been racking my brains on this for the last couple of weeks reading/learning everything I possibly can. Posting here is my last resort. I realize what I'm asking is a fairly big task but I hope someone might be able to lend some more options.

01-08-2009, 03:39 AM
Hello Peppe,

in fact it is a big task.

by googling I found this c-code

max6953.c (http://user.chol.com/~ascbbs/ccscdrv2/max6953.c)

and did you take a look into the sourcecode (http://www.maxim-ic.com/products/display/software/MAX6952.zip) of a
demoprogram downloadable here (http://www.maxim-ic.com/appnotes.cfm/an_pk/980) ?

Did you experimentate with the device-adress hardocded testing through 0-15 with and without & FE ß

Did yiu check if there is voltage on the output-pins of the chip ?

if you can slow down the I2C-bus-speed you could use the oscilloscope-tool for the propeller to analyse the bitbanging of this demoapplication
to see what this software is doing

some more testcode from bascom AVR

This is the code I used
Rich J.

' MAX6953 Test.bas
' Use Techniks.com Maga32 board
' 4/1/04
$regfile = "m32def.dat"
$crystal = 16000000
Const Ic1_w = &H50 ' Write Addresses of MAX6953 IC1
Const Ic1_r = &B10100001 ' Read Addresses of MAX6953 IC1
Config Sda = Portc.1 ' I2C Data
Config Scl = Portc.0 ' I2c Clock

I2cstart ' Generate start code
I2cwbyte Ic1_w ' send write address
I2cwbyte &B0110 0001 ' send command
I2cwbyte &B0110 0001 ' send "1"
I2cstop ' Generate stop code


seems to have a different writeadress

best regards


01-09-2009, 05:13 AM
Thanks for the code and links Stefan.· I've seen all but one. However, I spent a bit more time inspecting the maxim program as well as trying to see what each of the code snippets had in common. Late last night I was able to at the very least get the LEDs to blink..once!·Very exciting when you've been trying to get it going for a couple of weeks :). The bad part is they blink for .5 sec and then it's done. Almost like it's not holding the values.· I think I might be able to figure that one out on my own. Seems a little easier now that I know that I am communicating with the·max chip


PUB MaxWrite(i2cData) : ackbit
return i2cWrite(i2cData,8)


i.MaxWrite($A0) ' write address
i.MaxWrite($04) ' config address
i.MaxWrite($01) ' disable shutdown
i.MaxWrite($A0) ' write address
i.MaxWrite($07) ' display test
i.MaxWrite($01) ' enable display test (all leds on)

But now I have a second, kind of similar question. The max chip will only drive LEDs with a· forward voltage of 1.3. For the LEDs I'm using to test this will work fine. But the LEDs I will be using have a forward voltage of 3.2-3.4. Any ideas on what I can do to increase the voltage to the LEDs and not kill the max chip? The max input voltage on the chip is 5V to drive the LEDs with a 1.3V.· At least that's the way I've interpreted this:

Choosing Supply Voltage to Minimize Power Dissipation (Page 19)
The MAX6953 drives a peak current of 40mA into LEDs
with a 2.4V forward-voltage drop when operated from a
supply voltage of at least 3.0V. The minimum voltage
drop across the internal LED drivers is therefore (3.0V -
2.4V) = 0.6V. If a higher supply voltage is used, the driver
absorbs a higher voltage, and the driver’s power
dissipation increases accordingly. However, if the LEDs
used have a higher forward voltage drop than 2.4V, the
supply voltage must be raised accordingly to ensure
that the driver always has at least 0.6V headroom.
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 MAX6953 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 that the dissipation limit for
the MAX6953 is not exceeded. This can be achieved
by inserting a series resistor in the supply to the
MAX6953, ensuring that the supply decoupling capacitors
are still on the MAX6953 side of the resistor. For
example, consider the requirement that the minimum
supply voltage to a MAX6953 must be 3.0V, and the
input supply range is 5V ±5%. Maximum supply current
15mA + (40mA x 10) = 415mA
Minimum input supply voltage is 4.75V. Maximum
series resistor value is:
(4.75V - 3.0V) / 0.415A = 4.22Ω
We choose 3.3Ω ±5%. Worst-case resistor dissipation
is at maximum toleranced resistance, i.e., (0.415A)2 ✕
(3.3Ω x 1.05) = 0.577W. We choose a 1W resistor rating.
The maximum MAX6953 supply voltage is at maximum
input supply voltage and minimum toleranced
resistance, i.e., 5.25V - (0.415A x 3.3Ω x 0.95) = 3.95V.

As I'm sure you've noticed I'm a electronics noob and I'm taking quite a big jump for a first project. All I really·need is a point in the right direction and I can usually find what I need via google.

Post Edited (Peppe316) : 1/9/2009 3:31:26 AM GMT

01-09-2009, 12:53 PM
Ok, as usual after I post about how something won't work it usually works and it did...kinda :)

I'm getting some awfully bad blinking happening even if I explicitly turn of 'blink' mode. Along with that the top row stays fully lit through the whole sequence.· Throughout both runs the max chip is recieving 4.9V. Any ideas on what might be going on here?

http://www.youtube.com/watch?v=zT78AOTIewY·(Full run from A-Z)
http://www.youtube.com/watch?v=1mpUUDpczdw·(with display test on in the beginning)

Code used for the tests:


i.MaxWrite($A0) ' write address
i.MaxWrite($04) ' config address
i.MaxWrite(%00110001) ' disable shutdown clear globally and turn off bliking
i.MaxWrite($00) ' set intensity 16 to very low
i.MaxWrite($00) ' set intensity 32 to very low
i.MaxWrite($A0) ' write address
i.MaxWrite($07) ' display test
i.MaxWrite($01) ' enable display test (all leds on)
WaitCnt(ClkFreq*2 + cnt)
i.MaxWrite($A0) ' write address
i.MaxWrite($07) ' display test
i.MaxWrite($00) ' enable display test (all leds on)

tempd:=$41 ' A
repeat tempd from $41 to $5A ' Loop from A to Z
i.MaxWrite($20) ' Plane 0 digit 0
i.MaxWrite(tempd) ' character to write
WaitCnt(ClkFreq +100+ cnt)
if(tempd==$5A) ' if z start over

01-09-2009, 03:33 PM
Hello Peppe,

to increase the output-voltage you can use transistors. As you have really a lot outputlines transistorarrays woud be suitable.
It depends on the current which type of transistorarray would be suitable.

From just a quick look at the schematics I'm unsure about the exact design. As a quick guess (that might be wrong)

There are 5 columms to which the ANODEs of the LEDs are connected.
It might be enough to use transistors on the columms and keep the Kathodes on the rows connected directly to the MAX-chip.
The rows seemed to be on ground if the LED is switched on.

Measure the voltage between ground and a columm-output when the related LED is switched ON
If you are able to switch on some of the LEDs stable. (ON steady for some minutes)

If this voltages is very near to ground (some Millivolts) this should work

best regards