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.

Ryan Mick's Content

There have been 8 items by Ryan Mick (Search limited from 29-March 23)


By content type

See this member's

Sort by                Order  

#42592 Introducing Netduino Plus 2

Posted by Ryan Mick on 02 January 2013 - 06:58 PM in Netduino Plus 2 (and Netduino Plus 1)

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.




#42586 Introducing Netduino Plus 2

Posted by Ryan Mick on 02 January 2013 - 04:33 PM in Netduino Plus 2 (and Netduino Plus 1)

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.




#28374 Help with 24 bit ADC - LTC2499

Posted by Ryan Mick on 01 May 2012 - 03:20 AM in General Discussion

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;



#28314 Help with 24 bit ADC - LTC2499

Posted by Ryan Mick on 29 April 2012 - 09:00 PM in General Discussion

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;



#27190 Help with 24 bit ADC - LTC2499

Posted by Ryan Mick on 13 April 2012 - 09:49 PM in General Discussion

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.



#27168 Help with 24 bit ADC - LTC2499

Posted by Ryan Mick on 13 April 2012 - 05:27 PM in General Discussion

Thanks Mario, I had looked at that post several times before I posted but the usable bit pattern is different for that chip and not in two's compliment format from what I can tell. And they divide the final value by 16 to clear the last 4 bits (this chip would need clear the last 6), which I totally do not understand how that would clear the last 4 bits. Like I said, binary manipulation is not my strong point and I haven't found anything that makes it easier for me to understand.



#27162 Help with 24 bit ADC - LTC2499

Posted by Ryan Mick on 13 April 2012 - 04:38 PM in General Discussion

I have recently ordered 2 LTC2499 24 bit ADC's. I should receive them shortly but I need help understanding how to convert the output, binary manipulation is not my strong point. On page 16 of the datasheet it gives the output format of the reading as 4 bytes (total of 32 bit numbered 31 to 0). Bit 31 is the sign bit and I know how to find out if its value (byte1 & 0x80 == sign). Bit 30 is described as the MSB but is not part of the 24 bit result, which means bits 29 to bit 6 are the 24 bit result and bits 5 to 0 are ignored. So after I get the sign how do I properly clear the up bits that are not needed and then properly read the value. The other catch is that the sheet says the result is in binary two's compliment, which just confused me even more when I looked up what that meant. Any help would be greatly appreciated in learning how to convert this value.

Thanks,
Ryan



#26778 Goodbye .NET MF?

Posted by Ryan Mick on 09 April 2012 - 02:13 PM in Netduino 2 (and Netduino 1)

@Franks,
I encountered this problem when trying to interface a HH10D humidity sensor to the Netduino. I got around the problem by using PCF8583 RTC. This real time clock has an event counter mode and an I2C interface. The wiki has the code to interface with it here.Hope that helps.




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.