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

Some questions about memory, I/O and Ports


  • Please log in to reply
7 replies to this topic

#1 Afshin

Afshin

    Member

  • Members
  • PipPip
  • 18 posts
  • LocationCanada

Posted 17 October 2012 - 01:47 PM

Hello, We are planning to use one of NetDuino boards (most likely NetDuino Plus) in some automation applications. Here are some questions we would like to clarify before ordering the board: 2) Is the flash memory where the compiled program will be saved? If yes, in the case that we need more memory how we can increase the size? Can SD card be used as an extra memory to save the complied program? If yes, is there any differences in the processing speed between running on SD card and running on the flash memory? 3) What is the maximum capacity of SD card that the module can support? Can we connect a hard drive using RS232 ports to the module (for example to save camera capturing)? 4) How many active I/O and R232 are provided on the module/board? How many USB and general I/O we can get from the module/board? and how many general RS232 will be left if RS232 ports should be used for I/O functions? 5) Can pin I/O pin 7 and 8 which are UART2 RTS, CTS be used as RX, TX. In general how many general I/O and RS323 we can get from the port? Is it possible to expand number of I/O(s) and RS232 ports? 6) it seems that netdunio and netduino plus are the same except the networking support on netduino plus. Are netduino plus boards replaceable by netduino boards (while keeping the same application) in the case that networking support is not required? Thanks.

#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 18 October 2012 - 04:53 AM

Hi Afshin,

Welcome to the Netduino community. A few quick answers....

2) Is the flash memory where the compiled program will be saved? If yes, in the case that we need more memory how we can increase the size? Can SD card be used as an extra memory to save the complied program? If yes, is there any differences in the processing speed between running on SD card and running on the flash memory?

Yes, your compiled application is deployed to the flash memory (code storage space). You can put assemblies on an SD card and load them in on the fly...but they'll take up RAM so you'll want to swap out the ones you don't need from time to time.

3) What is the maximum capacity of SD card that the module can support? Can we connect a hard drive using RS232 ports to the module (for example to save camera capturing)?

There's no technical maximum capacity, but we recommend sticking with 2GB or smaller cards. If you try a larger card and it works well for you, you're good to go with that too.

If you have a hard drive which connects via RS-232 and you have code which can talk to and save/load files...you could use an RS-232 level translator and hook that up. Certainly.

4) How many active I/O and R232 are provided on the module/board? How many USB and general I/O we can get from the module/board? and how many general RS232 will be left if RS232 ports should be used for I/O functions?

20 digital I/O (6 of which can also work as analog inputs).

5) Can pin I/O pin 7 and 8 which are UART2 RTS, CTS be used as RX, TX. In general how many general I/O and RS323 we can get from the port? Is it possible to expand number of I/O(s) and RS232 ports?

There are two UARTs on Netduino/Netduino Plus (D0/D1 and D2/D3). If you need to add more serial ports, I'd consider looking at Netduino Go. GoBus is designed to support that.

6) it seems that netdunio and netduino plus are the same except the networking support on netduino plus. Are netduino plus boards replaceable by netduino boards (while keeping the same application) in the case that networking support is not required?

Yes. In fact you can flash the regular Netduino firmware onto a Netduino Plus if you don't need the networking feature...and gain extra code space.

Chris

#3 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 18 October 2012 - 05:26 AM

Yes, your compiled application is deployed to the flash memory (code storage space). You can put assemblies on an SD card and load them in on the fly...but they'll take up RAM so you'll want to swap out the ones you don't need from time to time.

True that you might load an assembly from the SD, also true that it'll be placed on RAM, but...AFAIK, you really can't unload it, unless you restart the Netduino.
The Nwazet PIX6T4 game machine works this way.
The mechanism should be the same as in the regular .Net framework (i.e. desktop PC). Once an assembly is loaded, it's "glued" to the main one, and you haven't any chance to detach it.
For the regular .Net, you should load it in a separated domain, so that it could be trashed when it's not more useful.
Read this for details.
I don't think the "domains" feature is available in the Micro Framework.

My MicroWorkflow is a possible answer to this problem, because the "script" is hosted in a full-GC context. This allows you to load and unload any script (on RAM) as many times you want.
Cheers
Biggest fault of Netduino? It runs by electricity.

#4 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 18 October 2012 - 05:30 AM

Hi Mario, We do have some AppDomain functionality in .NET MF. Chris

#5 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 18 October 2012 - 11:55 AM

Hi Mario,

We do have some AppDomain functionality in .NET MF.

Chris

What???
Netduino is able to manage the following?
using System;
using System.Reflection;
class AppDomain2
{
public static void Main()
{
 Console.WriteLine("Creating new AppDomain.");
 AppDomain domain = AppDomain.CreateDomain("MyDomain", null);

            Console.WriteLine("Host domain: " + AppDomain.CurrentDomain.FriendlyName);
            Console.WriteLine("child domain: " + domain.FriendlyName);
   AppDomain.Unload(domain);
   try
      {
      Console.WriteLine();
      Console.WriteLine("Host domain: " + AppDomain.CurrentDomain.FriendlyName);
      // The following statement creates an exception because the domain no longer exists.
            Console.WriteLine("child domain: " + domain.FriendlyName);
      }
   catch (AppDomainUnloadedException e)
      {
      Console.WriteLine("The appdomain MyDomain does not exist.");
      }
   }
}

So turns that I could upload a DLL onto the SD via "whatever", then runs my own app without actually rebooting the N?
Biggest fault of Netduino? It runs by electricity.

#6 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 18 October 2012 - 07:16 PM

Hi Mario,

So turns that I could upload a DLL onto the SD via "whatever", then runs my own app without actually rebooting the N?

I know we're using AppDomains extensively in a project here, but I'm not sure if we're unloading them or not. Room for experimentation :)

We use AppDomains to load code off of an SD card for the Mono bootloader (see link for source):
http://forums.netdui...nd-sample-apps/

Chris

#7 Afshin

Afshin

    Member

  • Members
  • PipPip
  • 18 posts
  • LocationCanada

Posted 19 October 2012 - 01:24 PM

Thanks for your reply.

#8 Pankaj21

Pankaj21

    Member

  • Members
  • PipPip
  • 10 posts

Posted 14 January 2013 - 05:56 PM

Hi Chris,

 

Just as we have port expanders for I/O (like the MCP23017 etc.).

What can we deploy to add more serial ports?

I cannot use Netduino Go - as the base is Netduino mini for some specific reasons.

 

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.