I have an Ethernet to I2C converter, PR49-35_NCD5500, connected to the MCP4725 DAC. To test I wanted to set the DAC to output the lowest voltage, and then the highest voltage.
I’m creating the messages using a C# application on Windows to send the Ethernet to I2C converter the messages.
Should the clock be constantly running on the Ethernet to I2C converter, PR49-35_NCD5500, when it’s powered up, or does the clock only operate when it’s talking to the I2C device? Is the data high, and the clock low by default?
For the DAC address we are using the following:
public const byte TEST_DAC_ADRESS = 0xC0;
// To command the MC4725 to output 0V
public const byte TEST_MSB = 0x00;
public const byte TEST_LSB = 0x00;
Converted all that to strings and sent out through Ethernet to the NCD5500:
string outbytes = msg.address + msg.lsb_command + msg.msb_command;
writer_.Write(outbytes);
That didn’t work. Then I saw this example:
//Byte 1 0xAA NCD API Header Byte
//Byte 2 0x02 NCD API Byte Count
//Byte 3 0xFE Payload Byte 1 Command Header
//Byte 4 0x21 Payload Byte 2 Test 2-Way Communications
//Byte 5 0xCB NCD API Checksum 0xAA + 0x02 + 0xFE + 0x21 = 0xCB
So I added the API wrapper
public const byte NCD_API_HEADER = 0xAA;
Is this the correct header for my devices??? (PR49-35_NCD5500)
Then for the payload
// Tried these addresses with jumper on, off, which is the address for the MPC4725?!
//public const byte TEST_DAC_ADRESS = 0xC0;
//public const byte TEST_DAC_ADRESS = 0 x60;
public class I2CMessage
{
public string header;
public string byte_count;
public string address;
public string msb_command;
public string lsb_command;
public string checksum;
static public int numBytes = 3;
}
string outbytes = msg.header+ msg.byte_count + msg.address + msg.msb_command + msg.lsb_command + msg.checksum;
and to try and set to the highest voltage
public const byte TEST_MSB = 0x0F;
public const byte TEST_LSB = 0xFF;
Nothing works.
I can see the 6 byte messages being received and transmitted by the Ethernet to I2c converter, it this right? Shouldn’t the converter be sending only the payload?
Can anybody please help?