Interfacing to a MAX6958 via I2C. Help.
FrameShift.
Posts: 35
I was wondering how I could interface a MAX6958 LED Display Driver to the propeller.
I know its I2C, but I'm having trouble figuring out how to send data to the registers on the chip.
As you can tell I'm pretty lost. Any help would be appreciated. Thanks. PDF Data Sheet
I know its I2C, but I'm having trouble figuring out how to send data to the registers on the chip.
As you can tell I'm pretty lost. Any help would be appreciated. Thanks. PDF Data Sheet
Comments
the datasheet says on page 7
Slave Address
The MAX6958/MAX6959 have a 7-bit-long slave
address (Figure 3). The eighth bit following the 7-bit
slave address is the R/W bit. Set the R/W bit low for a
write command and high for a read command.
The MAX6958/MAX6959 are available in one of two
possible slave addresses (see Table 2 and Ordering
Information).
The first 6 bits (MSBs) of the MAX6958/
MAX6959 slave address are always 011100. <====================
Slave address bit A0 is internally hardwired to either GND in
the MAX695_A_, or V+ in the MAX695_B_. A maximum
of two MAX6958/MAX6959 devices can share a bus.
Message Format for Writing
A write to the MAX6958/MAX6959 comprises the trans-
mission of the MAX6958/MAX6959s’ slave address with
the R/W bit set to zero, followed by at least 1 byte of
information.
=======> The first byte of information is the command byte,
which determines the register that stores
the next byte written to the MAX6958/MAX6959.
on page 16 there is the description for the Display Test Register
page 16: Display Test Register
The display test register operates in two modes: normal
and display test (Table 19). Display test mode turns on
all LEDs by overriding, but not altering, all control and
digit registers (including the shutdown register) except
for the port configuration register. The duty cycle while
in display test mode is 28/64.
it has adress $07
so I guess to write into the Display Test Register you have to send
1.) byte slaveadress (depends on what type you have ordered
2.) byte $07
3.) byte $01 as the "1" enables the display testmode
writing $00 to register $07 and the max acts in normal mode
This is what I can say from reading the manual without buying the chip and test it on my own.
If this does not answer your questions you have to be much more specific with a new question.
best regards
Stefan
Post Edited (StefanL38) : 4/16/2009 1:11:03 PM GMT
SCL is pin 5 and SDA is pin 6. The code doesn't seem to affect any of the outputs.
I'm using the Basic_I2C_Driver.
can you attach a picture of how you have connected the MAX-IC with the propeller
best regards
Stefan
-Tom
very pragmatic drawing by hand and scanning it at 300 dpi
save it as a black-white png file or if not too big as a jpg-file and attach it to a posting using the Post a reply button and the attachement manager.
Also attach your sourcecode
Did you made some tests with the EEPROM ?
best regards
Stefan
I had to write the I2C routines to interface to it, so it took
a bit to get it going. (I'm using a HC12)
However, if you haven't figured out how to use it, I can provide a
little assistance.
I also created some small PCBs that have 4-7 segment LEDs. along
with the interface for 4 indiviudal LEDs, though I haven't tested those
yet. Thought I'd add them in case I wanted to use them in the future.
·