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's Content

There have been 7 items by Cornelius (Search limited from 18-June 23)


By content type

See this member's

Sort by                Order  

#34173 Delay microseconds

Posted by Cornelius on 24 August 2012 - 07:28 PM in Netduino 2 (and Netduino 1)

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,

Attached Thumbnails

  • delayUs.png



#33879 PWM version

Posted by Cornelius on 18 August 2012 - 09:21 PM in Netduino Plus 2 (and Netduino Plus 1)

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!



#33873 PWM version

Posted by Cornelius on 18 August 2012 - 03:57 PM in Netduino Plus 2 (and Netduino Plus 1)

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.



#33870 PWM version

Posted by Cornelius on 18 August 2012 - 02:44 PM in Netduino Plus 2 (and Netduino Plus 1)

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.



#33859 PWM version

Posted by Cornelius on 18 August 2012 - 08:52 AM in Netduino Plus 2 (and Netduino Plus 1)

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 :(



#33857 Netduino Firmware v4.2.0

Posted by Cornelius on 18 August 2012 - 07:25 AM in Netduino 2 (and Netduino 1)

Hi Chris, Thanks for the fast reply! Turns out I had an older version of the Netduino SDK (from april, i think), which did not have WinUSB drivers. After I re-installed the SDK, my PC recognized the Netduino. The rest of the process went smoothly. Thanks a lot! Cornelius



#33837 Netduino Firmware v4.2.0

Posted by Cornelius on 17 August 2012 - 05:04 PM in Netduino 2 (and Netduino 1)

Hi,
I'm having some trouble following this manual. After i loaded the TinyBooterDecompresor with the SAM-BA, i reconnected the Netduino and my PC did not have the drivers for it (Netduino - No Driver Found).
Needless to say, before this process everything worked just fine.

I have installed .NET Micro Framework v4.2 SDK (QFE2) and Netduino 4.2.0.1 SDK in advance, and also tried to use the drivers from thispost, but no success.

Any suggestions?




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.