Quantcast
Channel: MSP low-power microcontrollers
Viewing all articles
Browse latest Browse all 62309

Forum Post: RE: Require Tutorial for Programming using C Language of MSP430

$
0
0
You can use the built-in function _delay_cycles . It will delay cycles not secods, so you will have to a bit of math first. I don't know your board, but if I searched correctly its 8MHz. This means it goes through 8 000 000 cycles in 1 secod. If you delay 8 000 000 cycles, you will have waited for 1 second. For 1 milisecond, divide it by 1000, 8 000 000 / 1 000 = 8 000. So I would say: 1 second: _delay_cycles (8000000); 1 milisec: _delay_cycles(8000); I hope you can use those in your project.

Viewing all articles
Browse latest Browse all 62309

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>