Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

kersten's Content

There have been 9 items by kersten (Search limited from 19-April 23)


By content type

See this member's

Sort by                Order  

#48021 I2C on Netduino 1 not working

Posted by kersten on 04 April 2013 - 03:38 PM in Netduino 2 (and Netduino 1)

Hi Chris, I currently have no logic analyzer. My board is a "Netduino 2". Through the change of the pull-ups on 1.2 k, my problem currently is solved with the I2C . The board is working correctly. The bus line I first kept short. Am now going to test the OneWire DS 2482-100 with 1 DS18S20 on the I2C Bus. But I find no code example. The onewire functions are new in the 4.2 framework? Where can I get help for Microsoft.SPOT.Hardware.OneWire class?



#47353 I2C on Netduino 1 not working

Posted by kersten on 18 March 2013 - 09:16 PM in Netduino 2 (and Netduino 1)

My new test with the code: always count is 0: public static void Main(){ var device = new I2CDevice(new I2CDevice.Configuration(0x50, 100)); I2CDevice.I2CTransaction[] actionsWrite; uint adresse = 0x01; byte[] data = new byte[] { 0x42 }; byte[] buffer = new byte[3]; buffer[0] = (byte)(adresse >> 8); buffer[1] = (byte)adresse; data.CopyTo(buffer, 2); uint i = 0; do { actionsWrite = new I2CDevice.I2CTransaction[] { I2CDevice.CreateWriteTransaction(buffer) }; int count1 = device.Execute(actionsWrite, 1000); Thread.Sleep(1000); i++; Debug.Print(i.ToString()+" Count: " + count1.ToString()); } while (true); } I think the board is defective!



#47351 I2C on Netduino 1 not working

Posted by kersten on 18 March 2013 - 08:59 PM in Netduino 2 (and Netduino 1)

The processing of the 3 bytes in 3 transactions was only to test. The first transaction returns as Return Code: 0 bytes transfers. In the original code, all 3 bytes processed in one transaction but only with the Return Code: 0 Bytes The SCL line has at times no pulse on the instrument but always 4.85V even after the end of the transaction. Next I change my test back to one transaktion.



#47335 I2C on Netduino 1 not working

Posted by kersten on 18 March 2013 - 05:09 PM in Netduino 2 (and Netduino 1)

Hi CW2, The EEPROM is a Microchip 24LC64 (A0,A1,A2,WP = 0) Here is my Testcode: public static void Main() { I2CDevice.Configuration _slaveConfig = new I2CDevice.Configuration(0x50, 100); uint adresse = 0x01; byte[] buffer = new byte[2]; buffer[0] = (byte)(adresse >> 8); buffer[1] = (byte)adresse; int count = I2CBus.GetInstance().Write(_slaveConfig, buffer, 500); byte[] data = new byte[] { 0x42 }; count = I2CBus.GetInstance().Write(_slaveConfig, data, 500); Debug.Print("Count: " + count.ToString()); } The I2C connection to the display is the same. Another board with an ATmega32 working on the bus without problems



#47328 I2C on Netduino 1 not working

Posted by kersten on 18 March 2013 - 02:03 PM in Netduino 2 (and Netduino 1)

Hi, I again problems with the I2C bus in connection with the display and the serial EEPROM. When code in I2CBus "transferred = _slaveDevice.Execute (writeXAction, transactionTimeout)" Transferred is always 0 and there is also no exception. The multimeter can be seen in SCL and SDL has a frequency of 0.34 kHz and 4.85 V, and this is always constant. The motherboard is defective?



#47195 I2C on Netduino 1 not working

Posted by kersten on 14 March 2013 - 05:47 PM in Netduino 2 (and Netduino 1)

I found the cause: the display is set to power down mode. The power consumption is lowered to a minimum. The display remains visible. By addressing the I2C address of the display should be awakened. Does it not! I suspect the time between the writing of the address and the data is too low. Without power-down mode, the connection is normal. Thanks you for the help!



#47182 I2C on Netduino 1 not working

Posted by kersten on 14 March 2013 - 12:47 PM in Netduino 2 (and Netduino 1)

here is a link to this Display:
http://www.lcd-modul.../edip160-7e.pdf

The connection to the I2C EEPROM works.
The code to the LCD has been modified with the length byte and checksum but that does not:

I2CDevice.Configuration config = new I2CDevice.Configuration(0x6F, 100); //0xDE
I2CDevice device = new I2CDevice(config);
I2CDevice.I2CTransaction[] array = new I2CDevice.I2CTransaction[2];

Encoding code = Encoding.UTF8;
byte[] text = code.GetBytes("#DL" + "n"); // clear the display
byte[] buffer = new byte[text.Length+3];
buffer[0] = (byte)(0x11); // DC1
buffer[1] = Byte.Parse(text.Length.ToString());
int bcc = buffer[0] + buffer[1];
byte i = 0;
while (i < text.Length) { bcc = bcc + (byte)text[i]; i++; }
text.CopyTo(buffer, 2);
buffer[text.Length + 2] = (byte)bcc; // checksum
array[0] = I2CDevice.CreateWriteTransaction(buffer);
byte[] ack = new byte[1];
array[1] = I2CDevice.CreateReadTransaction(ack); // 0x06 should be returned
int count = device.Execute(array, 100);
Debug.Print("count: " + count.ToString());



#47156 I2C on Netduino 1 not working

Posted by kersten on 13 March 2013 - 09:13 PM in Netduino 2 (and Netduino 1)

Thank you "CW2" for the helpful info, after the change of address to 0x6F is not an "exception". But the connection still does not work. The following code: " I2CDevice.Configuration config = new I2CDevice.Configuration (0x6F, 100); I2CDevice device = new I2CDevice (config); I2CDevice.I2CTransaction [] array = new I2CDevice.I2CTransaction [1]; Encoding code = Encoding.UTF8; byte [] buffer = code.GetBytes write ("#DL" + "n"); array [0] = I2CDevice.CreateWriteTransaction (write buffer); COUNT_1 device.Execute int = (array, 1000); Debug.Print ("count1" count_1.ToString + ()); array [0] = I2CDevice.CreateWriteTransaction (write buffer); int = COUNT_2 device.Execute (array, 1000); Debug.Print ("count2" count_2.ToString + ()); " The return value of COUNT_1 = 0 but of COUNT_2 = 4 (sometimes even 0). The display should be deleted with this command, but no response .. The connection via I2C bus by a different controller (not Netduino) to the display is working properly. The pullup resistors to VCC or 4.7 k What can I do?



#47106 I2C on Netduino 1 not working

Posted by kersten on 12 March 2013 - 11:39 PM in Netduino 2 (and Netduino 1)

Hallo,

I have some days are a "Netduino 2". One of my first applications should connect to the I2C bus of an LCD display. I have tried a variety of source code, but all the same error.  Even if no connection to the I2C hardware is present, is the same error. What am I doing wrong? Here's my simple code: I2CDevice.Configuration config = new I2CDevice.Configuration (0xDE, 1); I2CDevice device = new I2CDevice (config); I2CDevice.I2CTransaction [] array = new I2CDevice.I2CTransaction [1]; byte [] buffer = new byte [1]; buffer [0] = 0x0C; array [0] = I2CDevice.CreateWriteTransaction (buffer); device.Execute (array, 1000); 

>> here comes the error:

'System.ArgumentException' occurred in Microsoft.SPOT.Hardware.dll. " "device.m_xAction": The value of the "m_xAction" can not be retrieved because no information about the containing class is available.  





home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.