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.
Photo

I2C netduino plus 2

I2C netduino plus 2

Best Answer JohanV , 22 January 2014 - 02:42 PM

Sorry for the late reply,

the (I2C) ND2+ works without a problem ( off course ).

Like Dave told here.

 

I was using false pull up resistors.

 

thanks

Go to the full post


  • Please log in to reply
15 replies to this topic

#1 JohanV

JohanV

    Member

  • Members
  • PipPip
  • 21 posts
  • LocationAmsterdam

Posted 07 February 2013 - 11:42 PM

I have a small test project running on the netduino plus.

( so any hardware or pull-up etc is ok )

 

and want to test it as well on the netduino plus 2.

 

the problem is the execute methode returns always 0 ( zero )

 

the divice address is 27 or (0x1B)

 

 

            for (address = 0x00; address < 126; address++)
            {
                I2CDevice.Configuration config = new I2CDevice.Configuration(address, 100);
 
                var n = I2CBus.Execute(config, 25, I2CBus.CreateWriteTransaction(new byte[] { 0xAC, 0x00 }));
             
                Debug.Print("INIT(" + address.ToString() + ")=" + n.ToString());
           
            }
 
the n var always gives 0, ( on the netduino plus 2. )
on the netduino plus this gives an 2 when found.
and 1 when there is no device.
 
i have tried some things from the forum, also updating the netduino 2.
( that turned out to be quite easy )
But no luck.


#2 JohanV

JohanV

    Member

  • Members
  • PipPip
  • 21 posts
  • LocationAmsterdam

Posted 10 February 2013 - 09:57 AM

I also found with nothing connected on the netduino plus 2 board,

the i2c. execute always return 0

 

the old netduino plus with nothing connected always return 2.

 

any ideas ?

 

thanks

Johan



#3 yogotie

yogotie

    Member

  • Members
  • PipPip
  • 16 posts

Posted 10 February 2013 - 03:29 PM

I had the same results when experimenting with pullups and the I2C bus locking issue.  If there was nothing there and no pullups then the bus got into a locked state, always returned 0.

 

Interestingly enough the arduino uno r3 hardware does not have this problem.



#4 JerseyTechGuy

JerseyTechGuy

    Advanced Member

  • Members
  • PipPipPip
  • 870 posts

Posted 10 February 2013 - 04:16 PM

Have you upgraded your ND+2 to the latest firmware with the I2C fixes?  Is this one of the things you tried?



#5 JohanV

JohanV

    Member

  • Members
  • PipPip
  • 21 posts
  • LocationAmsterdam

Posted 12 February 2013 - 03:28 PM

Hi Dave / Yogotie,

 

I realy hope to get this solved.

I'm struggeling for a week now with this.

 

I also read on a form the new ND2+ does not need pullups ?

 

Yes i updated the firmware, [color=rgb(40,40,40);font-family:helvetica, arial, sans-serif;]Version: 4.2.2 Update 2 (version 4.2.2.2)[/color]

http://forums.netdui...-v422-update-2/

 

-> i used the new SDA SDL connectors that should be ok ?

-> tried 3,3 and 5,0 Volts.

-> i have 1,2 Kb pullups  ( http://www.dsscircui...-resistors.html )

 

also the external reference: ( tried both )

SecretLabs.NETMF.Hardware.NetduinoPlus.dll ( 07-01-2013 )

SecretLabs.NETMF.Hardware.Netduino.dll  ( 27-10-2012 )

i think it should be newer file ?

 

The board is REV.A ?

 

should i change the pullups ? to 10k ?

 

I have 2 x DS2482 on the I2C bus. and this was quite ok, with the older ND1+.

 

 

 

 

Pinging... TinyCLR
HalSystemInfo.halVersion:               4.2.0.0
HalSystemInfo.halVendorInfo:            Netduino Plus 2 (v4.2.2.2) by Secret Labs LLC
HalSystemInfo.oemCode:                  34
HalSystemInfo.modelCode:                177
HalSystemInfo.skuCode:                  4102
HalSystemInfo.moduleSerialNumber:       00000000000000000000000000000000
HalSystemInfo.systemSerialNumber:       0000000000000000
ClrInfo.clrVersion:                     4.2.0.0
ClrInfo.clrVendorInfo:                  Netduino Plus 2 (v4.2.2.2) by Secret Labs LLC
ClrInfo.targetFrameworkVersion:         4.2.0.0
SolutionReleaseInfo.solutionVersion:    4.2.2.2
SolutionReleaseInfo.solutionVendorInfo: Netduino Plus 2 (v4.2.2.2) by Secret Labs LLC
SoftwareVersion.BuildDate:              Jan 26 2013

 

Any help would be great.

 

Thanks



#6 JohanV

JohanV

    Member

  • Members
  • PipPip
  • 21 posts
  • LocationAmsterdam

Posted 12 February 2013 - 04:20 PM

Also i found this in a post, from Mr Walker.

So the NetDuinoPlus.dll should be removed.

 

[color=rgb(40,40,40);font-family:helvetica, arial, sans-serif;]In the meantime, if you are upgrading your Netduino Plus 1 projects to Netduino Plus 2:[/color]


    [*]Remove the SecretLabs.NETMF.Hardware.NetduinoPlus.dll reference from your project.
    [*]Add the SecretLabs.NETMF.Hardware.Netduino.dll reference to your project
    [*]Change the deployment target in Project Properties > .NET Micro Framework
    [/list]

#7 NooM

NooM

    Advanced Member

  • Members
  • PipPipPip
  • 490 posts
  • LocationAustria

Posted 12 February 2013 - 04:27 PM

for the pullups: id suggest using 4.7 kilo-ohm - that worked great for me.

when adding more devices you can lower that, but from my experience most modules have allready pullups included

i havent changed my 4.7k so far, and iam using like 5 devices on the i2c bus



#8 JohanV

JohanV

    Member

  • Members
  • PipPip
  • 21 posts
  • LocationAmsterdam

Posted 12 February 2013 - 05:02 PM

To be sure. did you use the new SDA / SDL connectors ?

 

I try tonight to change the resistors. hope it will be solved.

 

thanks



#9 JohanV

JohanV

    Member

  • Members
  • PipPip
  • 21 posts
  • LocationAmsterdam

Posted 13 February 2013 - 09:19 PM

I have tried 1 and 2 devices and also the 4,7K  2,2K and 10K.

but no luck yet. the execute method still gives zero.

 

could it be a Rev.A issue ? of the netduino plus 2 ?



#10 JerseyTechGuy

JerseyTechGuy

    Advanced Member

  • Members
  • PipPipPip
  • 870 posts

Posted 13 February 2013 - 09:53 PM

I have not experienced any issues with ND+2 and I2C devices.  I have dozens of different I2C devices and all work fine on the ND+2.  All are using the proper Pullup Resistors and all are connected to the SDA and SCL lines not A4 & A5.  All of my boards are running the 4.2.2.2 firmware.

 

I still believe its an issue with your software or hardware wiring.



#11 JohanV

JohanV

    Member

  • Members
  • PipPip
  • 21 posts
  • LocationAmsterdam

Posted 14 February 2013 - 09:12 PM

My software and hardware works fine. on diferent boards as well.

also on the old NetDuino Plus (1).

 

this same problems i have is also on the STM32F4 Discovery.

 

Dave, could you test this small piece of code ? on your I2C bus ?

 

 

            for (address = 0x00; address < 126; address++)
            {
                I2CDevice.Configuration config = new I2CDevice.Configuration(address, 100);
                var n = I2CBus.Execute(config, 25, I2CBus.CreateWriteTransaction(new byte[] { 0xAC, 0x00 }));
                Debug.Print("INIT(" + address.ToString() + ")=" + n.ToString());
            }
 
On the old netduino it returns a 2 and a 1 if it finds an I2C device.
 
thanks


#12 JohanV

JohanV

    Member

  • Members
  • PipPip
  • 21 posts
  • LocationAmsterdam

Posted 14 February 2013 - 09:31 PM

Hi Dave,

 

your idea, could be right it could still be software. 

i was thinking if it runs on the old netduino it should also run on the netduino 2.

 

thanks



#13 JerseyTechGuy

JerseyTechGuy

    Advanced Member

  • Members
  • PipPipPip
  • 870 posts

Posted 14 February 2013 - 11:10 PM

Hi Dave,

 

your idea, could be right it could still be software. 

i was thinking if it runs on the old netduino it should also run on the netduino 2.

 

thanks

 

In the beginning of the ND+2 release, there were known I2C issues with the earlier firmware but that has been resolved.  The only difference is the dedicated SDA and SCL pins.  I was able to easily transfer everything I had from ND+ to ND+2 and just move the two I2C wires on my shield from A4/A5 to SDA/SCL and everything ran like it always did.

 

I'll fire up one of my backup ND+2's tomorrow and test the code.  I will let you know what I find in about 24 hours from now.



#14 JohanV

JohanV

    Member

  • Members
  • PipPip
  • 21 posts
  • LocationAmsterdam

Posted 18 February 2013 - 06:17 PM

New Update,

 

i have been checking the I2C signal, on the old ND+ i get 3,3 and 0 signals or 5volt/0 volt on the 

I2C wires.

 

with the same hardware on the ND2+ the I2C signal is not pulled down to 0volt correctly.

the ND2+ is trying to communicate. it's like the signal is floating a bit.

 

any idea how to solve this ?



#15 JohanV

JohanV

    Member

  • Members
  • PipPip
  • 21 posts
  • LocationAmsterdam

Posted 19 February 2013 - 12:22 AM

I down graded the firmware to 4.2.1.1, and got the ND2+ sending some signals again on the I2C bus.

but the software I2C execute still give zero.



#16 JohanV

JohanV

    Member

  • Members
  • PipPip
  • 21 posts
  • LocationAmsterdam

Posted 22 January 2014 - 02:42 PM   Best Answer

Sorry for the late reply,

the (I2C) ND2+ works without a problem ( off course ).

Like Dave told here.

 

I was using false pull up resistors.

 

thanks






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

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.