Hello everybody
I'm trying to interface my Netduino standard to a Texas Instrument TPIC as shown up in the image!
That's the code:
using System; using System.Threading; using Microsoft.SPOT; using Microsoft.SPOT.Hardware; using SecretLabs.NETMF.Hardware; using SecretLabs.NETMF.Hardware.Netduino; namespace i2cMaster2._0 { public class Program { static OutputPort Gneg = new OutputPort(Pins.GPIO_PIN_D0, true); public static void Main() { OutputPort SDA = new OutputPort(Pins.GPIO_PIN_A4, false); // read in the forum to reset the 2 ports OutputPort SCK = new OutputPort(Pins.GPIO_PIN_A5, false); SDA.Dispose(); SCK.Dispose(); I2CDevice.Configuration cnf = new I2CDevice.Configuration(0x60, 400); I2CDevice TPIC2810 = new I2CDevice(cnf); byte[] outBuffer = new byte[] { 0x44, 0x64 }; I2CDevice.I2CWriteTransaction writeTransaction = I2CDevice.CreateWriteTransaction(outBuffer); I2CDevice.I2CTransaction[] transactions = new I2CDevice.I2CTransaction[] { writeTransaction }; while (true) { TPIC2810.Execute(transactions, 100); } } } }
and that's the sequence to send to the device in order to have 0x64 in the 8 leds.
I couldn't get it works so I have tried to test SDA and SCK with the oscilloscope and i just see a +5volts continue line without signals...
Where am i making mistakes? Has anyone got the same problem?
Thank you!
Here is the link of the TPIC2810 datasheet Click Here