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.

Man_in_UK

Member Since 11 Jan 2016
Offline Last Active May 02 2017 02:34 PM
-----

Topics I've Started

Toggle an output - quickly

03 October 2016 - 08:25 PM

I'm looking for a simple replacement for this code that is not really doing the job right.

I have got an output pin being toggled using .........................

 

Thread.Sleep(3);

clk = !clk;

 

You can see that the output named clk turns on and off dependent on how long it takes for the rest of the program to cycle through 3 times.

I would like it to toggle every 2.38ms (420hz) regardless of the rest of the program.

 

Is there simple solution to this?

 

P.S My knowledge of programming is strictly beginner. 


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.