Hello,
I have a display with 3 x Max6953 and I want to be a script. So 12 pieces 5x7 Dot Matrix
The addresses of 0x55 0x56 0x57 chips.
As far as I am already, see code.
Thank you
Fritz
#include <Wire.h> //Include I2C library.
//define the digits
int dig3 = 0x23;
int dig2 = 0x22;
int dig1 = 0x21;
int dig0 = 0x20;
int startdigit = 0;
void setup()
{
Serial.begin(9600); // Debugging only
Serial.println("RestekRipServer");
Wire.begin(); // join i2c bus (address optional for master)
Wire.beginTransmission(0x55); // transmit to device
Wire.write(0x04); // select configuration register MAX6953 Table 6
Wire.write(0x01); // disable shutdown;
Wire.endTransmission();
Wire.begin(); // join i2c bus (address optional for master)
Wire.beginTransmission(0x56); // transmit to device
Wire.write(0x04); // select configuration register MAX6953 Table 6
Wire.write(0x01); // disable shutdown;
Wire.endTransmission();
Wire.begin(); // join i2c bus (address optional for master)
Wire.beginTransmission(0x57); // transmit to device
Wire.write(0x04); // select configuration register MAX6953 Table 6
Wire.write(0x01); // disable shutdown;
Wire.endTransmission();
}
void writeChar(byte value,byte disp)
{
Wire.beginTransmission(0x55);
Wire.write(disp); // sends one byte
if (value == '\0') Wire.write(' ');
else Wire.write(value);
Wire.endTransmission();
Wire.beginTransmission(0x56);
Wire.write(disp); // sends one byte
if (value == '\0') Wire.write(' ');
else Wire.write(value);
Wire.endTransmission();
Wire.beginTransmission(0x57);
Wire.write(disp); // sends one byte
if (value == '\0') Wire.write(' ');
else Wire.write(value);
Wire.endTransmission();
}
void loop()
{
writeChar('R',dig0);
writeChar('E',dig1);
writeChar('S',dig2);
writeChar('T',dig3);
}
Looks to me like you are missing some configuration settings.
Take a look at what I had done in this file, and add some of the same commands.
This sketch is older, so you'll have to replace the older Wire commands with their newer form.
Hi Crossroads,
thank you for your information. I have read your thread and I am not speak English and this is my first Arduino project.
Try Duch I can already view the address 0x55 but I want to view the other two addresses.
#include <Wire.h> //Include I2C library.
//define the digits
int dig3 = 0x23;
int dig2 = 0x22;
int dig1 = 0x21;
int dig0 = 0x20;
int startdigit = 0;
void setup()
{
Serial.begin(9600); // Debugging only
Serial.println("RestekRipServer");
Wire.begin(); // join i2c bus (address optional for master)
Wire.beginTransmission(0x55); // transmit to device
Wire.write(0x04); // select configuration register MAX6953 Table 6
Wire.write(0x01); // disable shutdown;
Wire.endTransmission();
}
void writeChar(byte value,byte disp)
{
Wire.beginTransmission(0x55);
Wire.write(disp); // sends one byte
if (value == '\0') Wire.write(' ');
else Wire.write(value);
Wire.endTransmission();
}
void loop()
{
writeChar('T',dig0);
writeChar('E',dig1);
writeChar('S',dig2);
writeChar('T',dig3);
}
I think you are missing the "command byte", which tells the code which register the 4 data bytes are going to:
"A write to the MAX6953 comprises the transmission of the MAX6953's 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 which register of the MAX6953 is to be written by
the next byte, if received. If a STOP condition is detected after the command byte is received, then the
MAX6953 takes no further action (Figure 7) beyond storing the command byte.
Any bytes received after the command byte are data bytes. The first data byte goes into the internal register of
the MAX6953 selected by the command byte (Figure 8).
If multiple data bytes are transmitted before a STOP condition is detected, these bytes are generally stored
in subsequent MAX6953 internal registers because the command byte address generally autoincrements
(Table 4) (Figure 9)."
So you need to write to 55, then 20, then the 4 bytes.
Then 56, 20, 4 bytes
Then 57, 20, 4 bytes
I did, a few posts ago.
I suggest you simplify some - reduce things & show that you can talk to each part individually without the other 2 changing.
Perhaps the addressing isn't as you thought, perhaps you do not have the A0/A1 pins wired correctly for the chips to have their own address.
Hello,
the addresses are correct, because if I change the address 0x55 in 0x56 display shows the text in the middle of the display. I once entered in the photo the addresses. Unfortunately, I did not come on.
ok, I understand
in my example, 0x55 is the address of the master and
the addresses 0x56 and 0x57 is the slave.
how the code should look like I can write master and slave with different text?
Guys can you check my code to see if I have something deadly wrong? The display doesn't even light up on the test command. I only have one digit connected 7x5. Other out pins are nc.
#include <Wire.h>
// I2C device address is 101A3 A2A1A0, AD1 and AD0 are low so A3-2-1-0 are low also.
#define SLAVE0_ADDRESS 0x50 //0b1010000
//#define SLAVE0_ADDRESS_W 0xA0 //0b1010000
// Commands available, should be followed by a DATA_BYTE
#define COMMAND_BYTE_NO_OP 0x00 //No-Op
#define COMMAND_BYTE_INT10 0x01 //Intensity10
#define COMMAND_BYTE_INT32 0x02 //Intensity32
#define COMMAND_BYTE_SCAN 0x03 //Scan Limit, select if two or four displays are to be driven
#define COMMAND_BYTE_CONFIG 0x04 //Configuration, blinks, shutdowns, etc...
#define COMMAND_BYTE_USERFONT 0x05 //User-defined Fonts
#define COMMAND_BYTE_TEST 0x07 //Display Test, go in display mode turning on all LEDs
#define COMMAND_BYTE_D0P0 0x20 //Digit 0 Plane 0
#define COMMAND_BYTE_D1P0 0x21 //Digit 1 Plane 0
#define COMMAND_BYTE_D2P0 0x22 //Digit 2 Plane 0
#define COMMAND_BYTE_D3P0 0x23 //Digit 3 Plane 0
#define COMMAND_BYTE_D0P1 0x40 //Digit 0 Plane 1
#define COMMAND_BYTE_D1P1 0x41 //Digit 1 Plane 1
#define COMMAND_BYTE_D2P1 0x42 //Digit 2 Plane 1
#define COMMAND_BYTE_D3P1 0x43 //Digit 3 Plane 1
// DATA_BYTE for Config register
// Debug Variables
int BytesWritten1 = 99;
int BytesWritten2 = 99;
int TransmissionStatus = 99;
void setup()
{
// Pin that drives the blink
pinMode(3, OUTPUT);
// Starts I2C library uses ANALOG5 as SCL and ANALOG4 as SDA
Wire.begin();
// Starts the serial port for debug
Serial.begin(9600);
// Display config
Wire.beginTransmission(SLAVE0_ADDRESS);
Wire.write(COMMAND_BYTE_CONFIG);
Wire.write(0x01);
Wire.endTransmission();
// Intensity
Wire.beginTransmission(SLAVE0_ADDRESS);
Wire.write(COMMAND_BYTE_INT10); //Set intensity for Digit 1 and 3
Wire.write(0x33); //all segments 10 ma
Wire.endTransmission();
// Test Display
Wire.beginTransmission(SLAVE0_ADDRESS);
BytesWritten1 = Wire.write(COMMAND_BYTE_TEST);
BytesWritten2 = Wire.write(0x01);
TransmissionStatus = Wire.endTransmission();
delay(2000);
Wire.beginTransmission(SLAVE0_ADDRESS);
BytesWritten1 = Wire.write(COMMAND_BYTE_TEST);
BytesWritten2 = Wire.write(0x00);
TransmissionStatus = Wire.endTransmission();
}
void loop()
{
Serial.print("BytesWritten1 = ");
Serial.println(BytesWritten1, DEC);
Serial.print("BytesWritten2 = ");
Serial.println(BytesWritten2, DEC);
Serial.print("TransmissionStatus = ");
Serial.println(TransmissionStatus, DEC);
delay(2000);
// put a 5
Wire.beginTransmission(SLAVE0_ADDRESS);
BytesWritten1 = Wire.write(COMMAND_BYTE_D0P0);
BytesWritten2 = Wire.write(0x35);
TransmissionStatus = Wire.endTransmission();
delay(100);
delay(10);
}