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.
23 replies to this topic
#21
Posted 18 March 2013 - 08:59 PM
#22
Posted 18 March 2013 - 09:16 PM
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!
#23
Posted 30 March 2013 - 05:59 PM
Hi kersten,
What does the signal look like on a logic analyzer?
Are you using Netduino gen1 or Netduino gen2?
Which pins are you using?
Finally...what value are you using for your pull-up resistors?
Chris
#24
Posted 04 April 2013 - 03:38 PM
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?
Also tagged with one or more of these keywords: netduino, i2c
General →
General Discussion →
Netduino for my first productStarted by vishnusmoke , 12 Nov 2015 netduino, production, product |
|
|
||
Hardware →
Netduino 3 →
ND3 hangs calling File.Delete()Started by ukkiwisurfer , 06 Nov 2015 SD, Wifi, Netduino |
|
|
||
Hardware →
Netduino Mini →
Flashing Netduino Mini with Netduino 3Started by tridy , 13 Oct 2015 flashing, mini, netduino |
|
|
||
Hardware →
Netduino Plus 2 (and Netduino Plus 1) →
Why do I have to reboot my device to change the IP address?Started by cSharper , 31 Jul 2015 webserver, ip, netduino, change and 1 more... |
|
|
||
Hardware →
Netduino Plus 2 (and Netduino Plus 1) →
N+2 & Adafruit 7-segment LED Display with HT16K33 BackpackStarted by LennySh , 25 Jul 2015 Adafruit, seven, segment, LED and 5 more... |
|
|
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users