I've read and followed the example/explanation above and it looked great to me. I've got a problem wich looks like this. I'm trying to control the MAX6953. (Datasheet: MAX6953 http://pdfserv.maxim-ic.com/en/ds/MAX6953.pdf )
The MAX6953 is an I2C-controlled LED-matrix driver for 4 segments of 5*7 LED's.
I'm using a PIC16f870 to control one MAX6953. I thought it would be simple to try to use the display test mode first. In this test-mode, all LED's will light up.
This is the code I'm using:
Include "modedefs.bas"
DEFINE OSC 20
SCL VAR PORTB.0
SDA VAR PORTB.1
CommandByte VAR BYTE
SlaveAddress VAR BYTE
DataByte VAR BYTE
Main:
'Set the device address at the I2C-bus (datasheet page 10)
SlaveAddress = $50
'Set the Command Byte ($07 = displaytestmode. Datasheet page 11)
CommandByte = $07
'Set the Data Byte
DataByte = $01
'Write the data to the I2C-device
I2CWRITE SDA, SCL, SlaveAddress, CommandByte, [DataByte]
end
The problem is that there is nothing happening. Does anybody know what I'm doing wrong?





Bookmarks