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.

j2inet

Member Since 10 Mar 2013
Offline Last Active Apr 22 2013 06:08 PM
-----

Posts I've Made

In Topic: Bricked Netduino Plus. Help needed

13 April 2013 - 01:09 PM

The gold pin doesn't do anything on the Netduino Plus. To do the firmware update you need to hold down the reset button before connecting it to the computer, plug in the USB, then release the button. The procedures for the rest of the firmware update are pinned at the top of these forums. 


In Topic: Oreilly Book: NP2?

11 April 2013 - 08:37 PM

While either should work fine for that book I would go with the Netduino Plus 2. In just glancing at the spec sheets a few things stand out. 

 

Netduino Plus Specs: http://www.netduino....oplus/specs.htm

Netduino Plus 2 Spects: http://netduino.com/...plus2/specs.htm

 

 

Netduino Plus:

[font="Tahoma;font-size:small;"] ?[/font] [font="Tahoma;font-size:small;"]Speed: 48MHz, ARM7[/font] [font="Tahoma;font-size:small;"]
?[/font] [font="Tahoma;font-size:small;"]Code Storage: 64 KB[/font]
[font="Tahoma;font-size:x-small;"]without networking: 128 KB[/font] [font="Tahoma;font-size:small;"]
?[/font] [font="Tahoma;font-size:small;"]RAM: 42 KB
without networking: 60 KB[/font] digital i/o features Posted Image[font="Tahoma;font-size:small;"]
?[/font] all 20 digital and analog pins: GPIO [font="Tahoma;font-size:small;"]
?[/font][font="Tahoma;font-size:small;"]digital pins 0-1: UART 1 RX, TX[/font] [font="Tahoma;font-size:small;"]
?[/font] digital pins 2-3: UART 2 RX, TX [font="Tahoma;font-size:small;"]
?[/font] digital pins 5-6: PWM, PWM [font="Tahoma;font-size:small;"]
?[/font] digital pins 7-8: UART 2 RTS, CTS [font="Tahoma;font-size:small;"]
?[/font] digital pins 9-10: PWM, PWM [font="Tahoma;font-size:small;"]
?[/font] digital pins 11-13: SPI MOSI, MISO, SPCK [font="Tahoma;font-size:small;"]
?[/font] analog pins 4-5: I2C SDA, SCL

 

etduino Plus 2: 

 

[font="Tahoma;font-size:small;"]?[/font] [font="Tahoma;font-size:small;"]Speed: 168MHz, Cortex-M4[/font] [font="Tahoma;font-size:small;"]
?[/font] [font="Tahoma;font-size:small;"]Code Storage: 384 KB[/font] [font="Tahoma;font-size:small;"]
?[/font] [font="Tahoma;font-size:small;"]RAM: 100+ KB[/font]

 

 

digital i/o features Posted Image[font="Tahoma;font-size:small;"]
?[/font] all 22 digital and analog pins: GPIO [font="Tahoma;font-size:small;"]
?[/font] [font="Tahoma;font-size:small;"]digital pins 0-1: UART 1 RX, TX[/font] [font="Tahoma;font-size:small;"]
?[/font] digital pins 2-3: UART 2 RX, TX/PWM [font="Tahoma;font-size:small;"]
?[/font] digital pins 5-6: PWM, PWM [font="Tahoma;font-size:small;"]
?[/font] digital pins 7-8: UART 3 RX, TX
(also works as UART 2 RTS, CTS) [font="Tahoma;font-size:small;"]
?[/font] digital pins 9-10: PWM, PWM [font="Tahoma;font-size:small;"]
?[/font] digital pins 11-13: PWM/MOSI, MISO, SPCK [font="Tahoma;font-size:small;"]
?[/font] digital pin SD/SC: SDA/SCL
(also works as UART 4 RX, TX)


In Topic: High Resolution Delay

10 April 2013 - 01:26 AM

I'd be interested to see how reliable your solution is as NETMF is multithreading.  The garbage collector can be invoked at any time and you have no control over this.  What happens if an interrupt occurs part way through your loop?  Again this is something you will have no control over.

 

Good luck but my thoughts we going towards adding native code to the firmware to achieve what you want.

 

Thanx. The GC should't be an issue since this is running a single thread and using preallocated buffers and the other hardware would resend the message if an acknowledgement isn't received. I'll be sure to look into putting native code into the firmware for a long term fix. I can't say I am yet familiar with how to do that on Netduino. I had looked to see if there was support for loading native code (like some of the GHI hardware does) but it doesn't look like that will be an option. 

 

Any pointers of where I would look to get started with modifying the firmware? I've found the source code download links on the home page.  What else should I download or read?


In Topic: High Resolution Delay

09 April 2013 - 02:50 PM

I've just come up with a solution for my needs. I'm using a spin wait. 

 

When my program starts up I time how long it takes to perform 2^20 increments (this way the delay should work across different processor clock waits). Then I just use this information to decide how many cycles to wait. For the timing values that I need it looks like this should work. I've not accounted for the overhead of making the call to the method but I hope that it will be within tolerance for my application. 

 

Source code is below. The default calibration value is from a Netduino Plus 2 with the source code running in debug mode. As long as you call calibrate before using it the default value should not matter. 

    public class SpinWaitTimer    {        double _cyclesPerSecond = 112262.2255516001;        public double CyclesPerSecond        {            get { return _cyclesPerSecond; }            set { _cyclesPerSecond = value; }        }        public SpinWaitTimer()        {        }        public void Calibrate()        {            const int CYCLE_COUNT = 1048576;            int dummyValue = 0;            DateTime startTime = DateTime.Now;            for (int i = 0; i < CYCLE_COUNT; ++i)            {                ++dummyValue;            }            DateTime endTime = DateTime.Now;            TimeSpan timeDifference = endTime.Subtract(startTime);            _cyclesPerSecond = ((double)CYCLE_COUNT / (double)timeDifference.Ticks)*10000000d;        }        public void WaitSeconds(double sec)        {            int cycleCount = (int)((sec * CyclesPerSecond));            int dummyValue = 0;            for (int i = 0; i < cycleCount; ++i)            {                ++dummyValue;            }        }        public void WaitMilliseconds(double microseconds)        {            int cycleCount = (int)(_cyclesPerSecond * CyclesPerSecond / 1000d);            int dummyValue = 0;            for (int i = 0; i < cycleCount; ++i)            {                ++dummyValue;            }        }        public void WaitMicroseconds(double microseconds)        {            int cycleCount = (int)(_cyclesPerSecond * CyclesPerSecond / 1000000d);            int dummyValue = 0;            for (int i = 0; i < cycleCount; ++i)            {                ++dummyValue;            }        }    }

In Topic: [Netduino Plus] Driver not found on Windows 8

06 April 2013 - 06:13 PM

Try setting the driver path to "C:Program Files (x86)Secret LabsNetduino SDKDrivers" and make sure you check the option that tells it to search subdirectories too. 


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.