Netduino home hardware projects downloads community

Jump to content

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

Ryan Mick

Member Since 05 Jan 2011
Offline Last Active Jul 31 2013 03:35 AM

Posts I've Made

In Topic: Introducing Netduino Plus 2

02 January 2013 - 06:58 PM

Thanks Steve, I knew I had seen it somewhere. The pin out images should be with the hardware specs, it just helps make it more user friendly. I might have to spend some time and try to extract the data from the assemblies. If the source code is available, that would make it a lot easier to generate.

In Topic: Introducing Netduino Plus 2

02 January 2013 - 04:33 PM

Chris, I could have sworn I had seen an image in the forums of the N+2 with the pin breakouts but I can't seem to find it again. Can we get an image of the the N+2 with the pin functions? Also, it would be nice if there was an online reference of the SecretLabs namespace. It would make it a lot easier to know what objects exist there.

In Topic: Help with 24 bit ADC - LTC2499

01 May 2012 - 03:20 AM

Ok, a little closer I think. I have this wired to a trim pot and when I adjust it I get some unexpected values.

            byte byte0 = buffer[0];
            byte byte1 = buffer[1];
            byte byte2 = buffer[2];
            byte byte3 = buffer[3];

            int i = 0;

            bool sig = false;
            if ((byte0 & 0x20) == 0) {
                sig = true;

            byte0 = (byte)~byte0;
            byte0 &= 0x3F;
            Debug.Print("i is now");
            i = byte0 << 24;

            byte1 = (byte)~byte1;
            i |= byte1 << 16;

            byte2 = (byte)~byte2;
            i |= byte2 << 8;

            byte3 = (byte)~byte3;
            byte3 &= 0xC0;
            i |= byte3 ;

            i = (i >> 6)+1;

            if (sig) {
                i = i * -1;

            lReturn = i;

In Topic: Help with 24 bit ADC - LTC2499

29 April 2012 - 09:00 PM

Ok, I have the ADC and I am able to get some values out of it. I have a constant 1.5v going to channel 0 with a 5v ref voltage. Something about the way I am trying to figure out this 2's complement thing isn't working though. There returned values are:

byte0: 10101000
byte1: 10000100
byte2: 11101110
byte3: 01101101

The last bit of byte0 determines if it is a positive #. According to the datasheet a 1 is positive. The bit to it's right is the msb but not part of the value it is a status bit. The 24 bits following that are the value of the channel, the last 6 bits are discarded. As I have said before, binary manipulation is not my strong point so if someone can see what I am missing I would appreciate any feedback.

byte0 byte1 byte2 byte3
10101000 10000100 11101110 01101101 <--original values
00101000 10000100 11101110 01000000 <--modified values

            Int32 lReturn = 0;

            //Is this a positive #
            bool sig = false;
            if ((buffer[0] & 0x20) == 0) {
                sig = true;

            //Clear bits 31 and 30
            buffer[0] &= 0x1F;
            lReturn |= buffer[0];

            lReturn <<= 8;

            lReturn |= buffer[1];
            lReturn <<= 8;

            lReturn |= buffer[2];
            lReturn <<= 8;

            //Clear bits 5-0
            buffer[3] &= 0xC0;
            lReturn |= buffer[3];

            //2's compliment so flip the bits
            lReturn = ~lReturn;
            //Add 1
            lReturn += 0x01;

In Topic: Help with 24 bit ADC - LTC2499

13 April 2012 - 09:49 PM

Thanks Geancario2, I will look at the link. But remember the value is being received as 4 individual bytes, so it has to be pieced together first. I just received the chips today, now I need to assemble them and look at the values under a known analog value to see the resulting bits.

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.