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.


Member Since 22 Oct 2012
Offline Last Active May 28 2014 03:41 PM

#53475 VS2013 support?

Posted by Verdris on 23 October 2013 - 06:46 PM

On October 31, VS2013 will be released. It's currently out as an RC, and I'm downloading/installing it now.


Is there any news on VS2013 support for the Netduino?

#49402 Multiple Identical Class-Driven SPI devices

Posted by Verdris on 14 May 2013 - 12:49 AM

Hi all, I have this:

namespace TwoADC{    public class Program    {        public static SPI.Configuration LPMConfig = new SPI.Configuration(Pins.GPIO_PIN_D10, false, 0, 0, false, false, 1000, SPI_Devices.SPI1);        public static SPI.Configuration ScatteringConfig = new SPI.Configuration(Pins.GPIO_PIN_D7, false, 0, 0, false, false, 1000, SPI_Devices.SPI1);        public static AD7714 LaserADC = new AD7714(LPMConfig, Pins.GPIO_PIN_D9, Pins.GPIO_PIN_D8);        public static AD7714 ScatteringADC = new AD7714(ScatteringConfig, Pins.GPIO_PIN_D6, Pins.GPIO_PIN_D5);

And the AD7714 class I'm trying to adjust:

namespace TwoADC{    public class AD7714    {        public AD7714(SPI.Configuration gooby, Cpu.Pin DataReadyPin, Cpu.Pin ResetPin)        {            ADC_drdy = new InputPort(DataReadyPin, false, Port.ResistorMode.PullUp);            ADC_reset = new OutputPort(ResetPin, true);            ADCBus = new SPI(gooby);        }        private static InputPort ADC_drdy { get; set; }        private static OutputPort ADC_reset { get; set; }        private static SPI ADCBus { get; set; }

What I would like to do is declare each ADC separately, so that I can then call

int Scattering = ScatteringADC.ReadChannel(1, 1, false, 40);int LPM = LaserADC.ReadChannel(1, 1, false, 40);

And have each call address a different SPI device. The SPI devices are identical.


What happens is when I try to initialize the second SPI object, the program throws a System.InvalidOperationException. I have no idea why, but I assume it's in trying to declare two different objects on the same bus. When I comment out either of the AD7714 objects, the code compiles and runs. I'm using different Chip Select pins each time in the constructors, so I don't know where the complaint is.



#46431 GPIO as analog input

Posted by Verdris on 28 February 2013 - 09:23 PM


It would be a bad solution to mutliplex or use external shield while STM32 core has already powerful capabilities.



I'm afraid I'm not sure what your first phrase means, my english is not that good. If I correctly understood your question, yes, my inputs needs as much Samples/sec as it is possible. Currently we use 1kS/sec per channel but with other devices.


Chris Walker:

The STM32 core is capable to use more than those 6 analog pins. So I'm heading toward some tweaking, though I'm still confused about how this can be done. For example I start to look what IDE and C libraries STM offers.

If you have any clues or ideas which you can share with us about tweaking firmware, please let us know.

It would be great to combine ethernet with 8 analog inputs :)

It absolutely would not be a bad idea to use external parts, regardless of the STM32's power! My projects use AD7714 24-bit ADCs. Each part gives you 5 pseudo-differential inputs, and since they're SPI, you can use as many parts as you want, provided you can wire into CS individually. I use a full 6-wire interface for my parts, which means that I would need 3 ports for each part, aside from the SPI. That means I could use 5 of these ADCs, giving me 25 channels, each with 24-bit resolution.


I can even use more if I multiplex my IO.


The STM32 can't touch that.

#45093 Pass analog value through cable without loss

Posted by Verdris on 07 February 2013 - 05:45 PM

@CW2: I mean the impedance of the sensor, not the resistance of the wiring!

Since any (long) wiring is much like as an antenna and leads to capacitive, inductive and resistive behaviors, the lower is the impedance of the generator (=sensor), the lower will be the probability to alter the signal for any parasitic influence.


Anyway, I think that the easiest way is to try, since 10mt of coax cable are inexpensive.


Especially if the wire is to be left unshielded, it will be susceptible to 50/60Hz noise. To eliminate sensor impedance, a buffer amp could be used, I suppose. That might help clean things up.

#43586 Confused about Classes and initializing hardware

Posted by Verdris on 17 January 2013 - 09:04 AM

Suppose I write a class, call it AD7714. Inside that class but before any functions I declare a private static SPI.Configuration. Do I need to do anything in the Program class to initialize the SPI hardware or does declaring it in the AD7714 class take care of that?


Edit: Yes, the class takes care of that. This little board is amazing. I'm finding that a lot of the libraries I've written for other C++ boards are easily translatable into Netduino's C#, with the exception of certain SPI libraries. For some reason, I was never able to get certain SPI parts working with Arduinos, though with the Netduino they work flawlessly.

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.