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

PWM


  • Please log in to reply
2 replies to this topic

#1 kalio20

kalio20

    Member

  • Members
  • PipPip
  • 22 posts

Posted 04 August 2015 - 04:50 PM

Is it possible to generate just 1 High Pulse? For example i am running on 100 Hz, but i need just 1 High Pulse, dat means my Generator has to run for just < 0.01 secs? But I want to avoid Methods like,

 

PWM.Start();

Thread.Sleep = (10);

PWM.Stop();

 

Thanks in advance!

 

Greets kalio!



#2 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 04 August 2015 - 06:39 PM

Not really.

 

To be honest if I wanted a single pulse I'd probably look at a simple timer like the NE555 and see if I could trigger the start event from the Netduino.

 

Not sure if you could but that would be a starting point for me.

 

Regards,

Mark


To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#3 NameOfTheDragon

NameOfTheDragon

    Advanced Member

  • Members
  • PipPipPip
  • 112 posts
  • LocationCanterbury, Kent, UK

Posted 05 August 2015 - 07:46 PM

As MArk said, PWM timers are inherently free-running so there's not really a reliable way to stop them after one cycle. The CPU on the Netduino has lots of timers that might be able to set an output when they time out, but I'm not sure if the .Net Framework provides direct access to those. Depending on how critical your timing is, you might be able to do it with a CLR timer (System.Threading.Timer), which have a resolution of 1 millisecond which happens to be about what you want, but keep in mind that 'Windows' has never been considered to be a deterministic operating system so the call back might not happen on time.

 

Without knowing what you're trying to achieve (the XY problem http://xyproblem.info)then it seems like the solution is to use some sort of external device, a 555 timer or an RC circuit that you can trigger from an output.

 

Regards,

Tim Long 






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.