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

net micro framework porting questions


  • Please log in to reply
4 replies to this topic

#1 Frank26080115

Frank26080115

    Member

  • Members
  • PipPip
  • 22 posts

Posted 04 December 2010 - 06:39 AM

The goal of my open-source calculator is to provide C# APIs for reading the button matrix, output to the LCD (graphical, uses SPI), read text/xml files off microSD card, and talk over Bluetooth serial port with a PC, I will then implement a basic calculator, then the user is expected to implement their own behaviour using C#. I would like to port .NMFW to include only what is needed for these functions (as the final product will not have GPIOs available anyways). I have downloaded and explored the source code for Netduino's firmware and read the documentation provided by the .NMFW Porting Kit, and I see how AnalogInput was implemented. That example is a great starting point for me. However, I am confused by how System.IO is able to access an SD card, but I can't find the file that handles the low-level communication between the processor and card, all I can find are a few stubs with configuration information. I also can't seem to find anything that resembles low-level access to the UART module but apparently System.IO.Ports.SerialPort still works. What exactly is already provided by .NMFW? Did Microsoft build low-level UART, SPI, SD card functions into .NMFW for AT91SAM7X512 but forget about AnalogInput?

#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 04 December 2010 - 06:46 AM

Hi Frank, Microsoft built the core .NET Micro Framework platform. Atmel and other companies (along with engineers at Microsoft) created "hardware abstraction layer" ports for their microcontrollers. The base .NET Micro Framework does not have features such as AnalogInputs (ADC) or PWM. So we wrote these. Additionally, we've expanded on the base Atmel port with features like variable-bit SPI, Wiznet TCP/IP chip support, etc. Community members are contributing a lot of code to the project too--the first of which you'll be seeing in the v4.1.1 firmware. All of the low-level code for FAT file system access (via block storage) is in the .NET Micro Framework porting kit. But it's in layers. It may take a while to understand where everything is. In our case, we usually break into the code from a high-end RVICE JTAG debugger to trace execution paths. Chris

#3 Frank26080115

Frank26080115

    Member

  • Members
  • PipPip
  • 22 posts

Posted 04 December 2010 - 08:19 PM

I see, I found the low level code I was looking for inside the .NMFW source code, and I think I found the SD card access code as well, although it seems to use SPI, does this mean that even if LPC is targeted, it would not utilize their special built-in 4-bit SD card mode? How can I tell if a feature has been implemented? Where is this information documented? How can I tell what kind of resources that .NMFW occupies? For example, I'd like my keyboard input to measure the length of a button press, would I be able to safely use a timer without causing issues with .NET features such as thread sleep, datetime, timer, or timespan? Is it possible to vary my CPU clock speed during runtime to conserve power and not affect debugging and the timing functions in .NET? I see a list of C++ equivalent datatypes for C# datatypes but did not find one for "Decimal", being able to write fast math function using the precise decimal datatype would be awesome for a calculator, is there no such equivalent in C++? (and can you make the text have more contrast on this website? gray on gray is really hard to read, such as where the forum topics are listed)

#4 Jim Davies

Jim Davies

    Advanced Member

  • Members
  • PipPipPip
  • 48 posts
  • LocationBrighton & Hove, UK

Posted 10 December 2010 - 01:11 PM

+1 on the colour scheme point!

#5 bill.french

bill.french

    Advanced Member

  • Members
  • PipPipPip
  • 260 posts
  • LocationPrinceton, NJ

Posted 10 December 2010 - 02:06 PM

go here for color voting: http://forums.netdui...ch__1#entry4029 :D




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.