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.

Cornelius

Member Since 22 Jun 2012
Offline Last Active Apr 09 2016 02:51 PM
-----

Posts I've Made

In Topic: Delay microseconds

24 August 2012 - 07:28 PM

Hi,

Here's a function that i wrote. I find it quite accurate: (loosely based on the functions mentioned above)

private static void delayMicroseconds(int microseconds)
{
   for (int temp = 0; temp < ((microseconds - 208)/61); temp++);
}

It works in ~65us wide steps, and it's minimum is about 240us.

have fun,

In Topic: PWM version

18 August 2012 - 09:21 PM

We're working on updates samples for the "Getting Started with Netduino" kit. In the meantime, grab a copy of the Netduino SDK 4.2.0 source from the downloads page...and it will show you how we wrap the new classes inside the legacy classes.


I'll do that.
Thanks!

In Topic: PWM version

18 August 2012 - 03:57 PM

I would recomend using the new classes.


Thanks :)

Do you have any example for working with the new classes?
How does the Cpu.PWMChannel enumaration relate to the GPIO pins of the Netduino?

C.

In Topic: PWM version

18 August 2012 - 02:44 PM

Hi Chris,

The final release includes the new AnalogInput and PWM classes by default. If you want to use the legacy ones, you can pull those in by explicitly adding them as references to your project.


I understand that there are two PWM classes one could use in his project, but i'm wondering which is better.

In my current project, i'm trying to build an IR emitter with a 38KHz carrier.
the Netduino PWM class can supply this frequency (SetPulse(26,8) for example) but modulating it is a problem: there is no start/stop, and changing the duration parameter takes too long (about 300us).

My hopes were that the new Microsoft PWM class would react faster or have a start/stop function, but from this post it seems that it is better not to use it.
moreover, it is not clear how to use it - how does the PWM enumaration relate to the Netduino GPIOs.

BTW, if it is not recommended to use the new classes, why were the old ones replaced..? :huh:

Thanks again,
C.

In Topic: PWM version

18 August 2012 - 08:52 AM

With the 4.2 beta for Netduino Classic/Plus you would need Secretlabs.NETMF.Hardware for the PWM class. best to not reference to Microsoft.SPOT.Hardware.PWM.dll


Does this apply to the final release of the 4.2 framework as well?
I thought that new PWM and AnalogInput classes are suppose to better... if there is not way to use them, it kind of defeats the purpose :(

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.