WAITMS/de

From MCS Wiki AVR
< WAITMS(Difference between revisions)
Jump to: navigation, search
((**COPIED FROM ENGLISH PAGE**) =)
(Action)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<span class="f_Header">Action</span>  
+
= <span class="f_Header">Funktion</span> =
  
 
Hält die Programmausführung für die angegebene Zeit in Millisekunden an.
 
Hält die Programmausführung für die angegebene Zeit in Millisekunden an.
Line 15: Line 15:
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
  
= <span class="f_Header">Remarks</span> =
+
= <span class="f_Header">Anmerkungen</span> =
 
<div style="padding: 0px; margin: 0px 0px 0px 4px;">
 
<div style="padding: 0px; margin: 0px 0px 0px 4px;">
 
{| width="488" cellspacing="0" cellpadding="1" border="1" style="border: 2px solid rgb(0, 0, 0); border-spacing: 0px; border-collapse: collapse;"
 
{| width="488" cellspacing="0" cellpadding="1" border="1" style="border: 2px solid rgb(0, 0, 0); border-spacing: 0px; border-collapse: collapse;"
 
|- style="vertical-align: top;"
 
|- style="vertical-align: top;"
 
| valign="top" width="13%" style="width: 60px; border: 1px solid rgb(0, 0, 0);" |  
 
| valign="top" width="13%" style="width: 60px; border: 1px solid rgb(0, 0, 0);" |  
Ms
+
mS
  
 
| valign="top" width="100%" style="width: 419px; border: 1px solid rgb(0, 0, 0);" |  
 
| valign="top" width="100%" style="width: 419px; border: 1px solid rgb(0, 0, 0);" |  
The number of milliseconds to wait. (1-65535)
+
Wartezeit in Millisekunden (1-65535)
  
 
|}
 
|}
Line 29: Line 29:
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
  
No accurate timing is possible with this command.
+
Ein genaues Timing ist mit WAITMS nicht möglich.
  
In addition, the use of interrupts can slow this routine.
+
Außerdem können Interrupts die Wartezeit verlängern.
  
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
Line 37: Line 37:
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
  
= <span class="f_Header">See also</span> =
+
= <span class="f_Header">Siehe auch</span> =
  
 
[[DELAY]]&nbsp;,&nbsp;[[WAIT]]&nbsp;,&nbsp;[[WAITUS]]
 
[[DELAY]]&nbsp;,&nbsp;[[WAIT]]&nbsp;,&nbsp;[[WAITUS]]
Line 45: Line 45:
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
  
= <span class="f_Header">ASM</span> =
+
= <span class="f_Header">Assembler</span> =
  
 
WaitMS will call the routine _WAITMS. R24 and R25 are loaded with the number of milliseconds to wait.
 
WaitMS will call the routine _WAITMS. R24 and R25 are loaded with the number of milliseconds to wait.
Line 87: Line 87:
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
  
= <span class="f_Header">Example</span> =
+
= <span class="f_Header">Beispiel</span> =
  
 
<br/><source lang="bascomavr">
 
<br/><source lang="bascomavr">

Latest revision as of 23:01, 17 February 2013

Contents

Funktion

Hält die Programmausführung für die angegebene Zeit in Millisekunden an.

 

 

Syntax

WAITMS mS

 

 

Anmerkungen

mS

Wartezeit in Millisekunden (1-65535)

 

Ein genaues Timing ist mit WAITMS nicht möglich.

Außerdem können Interrupts die Wartezeit verlängern.

 

 

Siehe auch

DELAY , WAIT , WAITUS

 

 

Assembler

WaitMS will call the routine _WAITMS. R24 and R25 are loaded with the number of milliseconds to wait.

Uses and saves R30 and R31.

Depending on the used XTAL the asm code can look like :

_WaitMS:

_WaitMS1F:

Push R30 ; save Z

Push R31

_WaitMS_1:

Ldi R30,$E8 ;delay for 1 mS

Ldi R31,$03

_WaitMS_2:

Sbiw R30,1 ; -1

Brne _WaitMS_2 ; until 1 mS is ticked away

Sbiw R24,1

Brne _WaitMS_1 ; for number of mS

Pop R31

Pop R30

Ret

 

 

Beispiel


WAITMS 10 'wait for 10 mS
Print "*"

Languages   English Deutsch  
Personal tools
Namespaces
Variants
Actions
Navigation
In other languages
Language