START/de

From MCS Wiki AVR
< START(Difference between revisions)
Jump to: navigation, search
(Example)
(Remarks)
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
== (**COPIED FROM ENGLISH PAGE**) === <span class="f_Header">Action</span> =
+
= <span class="f_Header">Funktion</span> =
  
Start the specified hardware source.
+
Startet die angegebene Hardware-Einheit.
  
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
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="557" cellspacing="0" cellpadding="1" border="1" style="border: 2px solid rgb(0, 0, 0); border-spacing: 0px; border-collapse: collapse;"
 
{| width="557" cellspacing="0" cellpadding="1" border="1" style="border: 2px solid rgb(0, 0, 0); border-spacing: 0px; border-collapse: collapse;"
Line 23: Line 23:
  
 
| valign="top" width="100%" style="width: 468px; border: 1px solid rgb(0, 0, 0);" |  
 
| valign="top" width="100%" style="width: 468px; border: 1px solid rgb(0, 0, 0);" |  
TIMER0, TIMER1, COUNTER0 or COUNTER1, WATCHDOG, AC (Analog comparator power), ADC(A/D converter power) or DAC(D/A converter).
+
TIMER0, TIMER1, COUNTER0 oder COUNTER1, WATCHDOG, AC (Analog comparator power), ADC(A/D converter power) oder DAC(D/A converter).
  
 
|- style="vertical-align: top;"
 
|- style="vertical-align: top;"
Line 30: Line 30:
  
 
| valign="top" width="100%" style="width: 468px; border: 1px solid rgb(0, 0, 0);" |  
 
| valign="top" width="100%" style="width: 468px; border: 1px solid rgb(0, 0, 0);" |  
For the Xmega you can also specify&nbsp;: DACA or DACB for the Digital/Analog Converters A and B.
+
Für den Xmega kann man auch angeben: DACA oder DACB für die Digital/Analog Converter A und B.
  
ADCA and ADCB for the A/D converters.
+
ADCA und ADCB für die A/D Converter.
  
For the timers you can use TCC0, TCC1, TCD0, TCD1, TCE0, TCE1, TCF0 and TCF1.
+
Für die Timer kann man TCC0, TCC1, TCD0, TCD1, TCE0, TCE1, TCF0 und TCF1 benutzen.
  
To start a DMA soft transfer, you can use DMACH0, DMACH1, DMACH2 and DMACH3
+
Um einen DMA Soft Transfer zu starten kann man DMACH0, DMACH1, DMACH2 und DMACH3 benutzen.
  
 
|- style="vertical-align: top;"
 
|- style="vertical-align: top;"
Line 43: Line 43:
  
 
| valign="top" width="100%" style="width: 468px; border: 1px solid rgb(0, 0, 0);" |  
 
| valign="top" width="100%" style="width: 468px; border: 1px solid rgb(0, 0, 0);" |  
The optional cfg is only used for the TIMER when the optional CONFIGURATION is used.
+
Das optionale cfg wird nur für die TIMER verwendet wenn das optionale CONFIGURATION benutzt wird.
  
 
&nbsp;
 
&nbsp;
  
If&nbsp;<span style="font-weight: bold;">CONFIG TIMERx = option , CONFIGURATION=mysetting</span>
+
Wenn&nbsp;<span style="font-weight: bold;">CONFIG TIMERx = option , CONFIGURATION=mysetting</span>
  
was used, you would specify START TIMERx, mysetting.
+
benutzt wurde dann würde man spezifizieren: START TIMERx, mysetting.
  
 
&nbsp;
 
&nbsp;
Line 57: Line 57:
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
  
When you configure a timer (CONFIG TIMER), the TIMER is started automatically when a pre-scaler value is provided.
+
Wenn man einen Timer konfiguriert (CONFIG TIMER) so wird der Timer automatisch gestartet wenn ein Prescaler-Wert angegeben wird.
  
When you want to halt the timer you can use the STOP TIMER statement. To start the timer after it has been stopped, you can use the START TIMER statement. The START TIMER statement will only work correctly when you have selected a clock source or pre-scaler value with the CONFIG TIMER statement.
+
Wenn der Timer angehalten werden soll dann kann man STOP TIMER verwenden. Um den Timer wieder zu starten nachdem er gestoppt wurde kann man START TIMER benutzen. Der START TIMER Befehl funktioniert nur wenn eine Clock Source oder ein Prescaler mit dem CONFIG TIMER Befehl angegeben wurde.
  
When you stored settings using the option CONFIGURATION=setting , then you can specify which configuration the timer must use by providing the setting name as a parameter&nbsp;: START TIMER1 , mysetting
+
Wenn mit der Option CONFIGURATION=setting Settings gespeichert wurden dann kann man angeben welche Konfiguration der Timer benutzen soll indem der Setting-Name als Parameter angegeben wird: START TIMER1 , mysetting
  
 
&nbsp;
 
&nbsp;
  
When a timer is used in interrupt mode, it must be running otherwise the interrupt will never occur.
+
Wenn ein Timer im Interrupt-Modus verwendet wird dann muss er gestartet sein weil andernfalls niemals der Interrupt stattfindet.
  
TIMER0 and COUNTER0 are the same device. And so are TIMER1 and COUNTER1.
+
TIMER0 und COUNTER0 sind die selbe Einheit. Ebenso TIMER1 und COUNTER1.
  
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
  
The AC, ADC and DAC parameters will switch power to the device and thus enabling it to work.
+
Die AC, ADC und DAC Parameter schalten Strom auf das Device und ermöglichen dadurch deren Arbeit.
  
The WATCHDOG parameter will activate the Watchdog.
+
Der WATCHDOG Parameter aktiviert den Watchdog.
  
 
&nbsp;
 
&nbsp;

Latest revision as of 02:02, 19 February 2013

Contents

Funktion

Startet die angegebene Hardware-Einheit.

 

 

Syntax

START device [ , cfg]

 

 

Anmerkungen

Device

TIMER0, TIMER1, COUNTER0 oder COUNTER1, WATCHDOG, AC (Analog comparator power), ADC(A/D converter power) oder DAC(D/A converter).

XMEGA

Für den Xmega kann man auch angeben: DACA oder DACB für die Digital/Analog Converter A und B.

ADCA und ADCB für die A/D Converter.

Für die Timer kann man TCC0, TCC1, TCD0, TCD1, TCE0, TCE1, TCF0 und TCF1 benutzen.

Um einen DMA Soft Transfer zu starten kann man DMACH0, DMACH1, DMACH2 und DMACH3 benutzen.

cfg

Das optionale cfg wird nur für die TIMER verwendet wenn das optionale CONFIGURATION benutzt wird.

 

Wenn CONFIG TIMERx = option , CONFIGURATION=mysetting

benutzt wurde dann würde man spezifizieren: START TIMERx, mysetting.

 

 

Wenn man einen Timer konfiguriert (CONFIG TIMER) so wird der Timer automatisch gestartet wenn ein Prescaler-Wert angegeben wird.

Wenn der Timer angehalten werden soll dann kann man STOP TIMER verwenden. Um den Timer wieder zu starten nachdem er gestoppt wurde kann man START TIMER benutzen. Der START TIMER Befehl funktioniert nur wenn eine Clock Source oder ein Prescaler mit dem CONFIG TIMER Befehl angegeben wurde.

Wenn mit der Option CONFIGURATION=setting Settings gespeichert wurden dann kann man angeben welche Konfiguration der Timer benutzen soll indem der Setting-Name als Parameter angegeben wird: START TIMER1 , mysetting

 

Wenn ein Timer im Interrupt-Modus verwendet wird dann muss er gestartet sein weil andernfalls niemals der Interrupt stattfindet.

TIMER0 und COUNTER0 sind die selbe Einheit. Ebenso TIMER1 und COUNTER1.

 

Die AC, ADC und DAC Parameter schalten Strom auf das Device und ermöglichen dadurch deren Arbeit.

Der WATCHDOG Parameter aktiviert den Watchdog.

 

 

 

Siehe auch

STOP

 

 

Beispiel


'--------------------------------------------------------------------------------
'name : adc.bas
'copyright : (c) 1995-2005, MCS Electronics
'purpose : demonstration of GETADC() function for 8535 or M163 micro
'micro : Mega163
'suited for demo : yes
'commercial addon needed : no
'use in simulator : possible
' Getadc() will also work for other AVR chips that have an ADC converter
'--------------------------------------------------------------------------------
$regfile = "m163def.dat" ' Wir benutzen einen M163
$crystal = 4000000
 
$hwstack = 32 ' default use 32 for the hardware stack
$swstack = 10 'default use 10 for the SW stack
$framesize = 40 'default use 40 for the frame space
 
 
'configure single mode and auto prescaler setting
'The single mode must be used with the GETADC() function
 
'The prescaler divides the internal clock by 2,4,8,16,32,64 or 128
'Because the ADC needs a clock from 50-200 KHz
'The AUTO feature, will select the highest clockrate possible
Config Adc = Single , Prescaler = Auto
'Now give power to the chip
Start Adc
 
'With STOP ADC, you can remove the power from the chip
'Stop Adc
 
Dim W As Word , Channel As Byte
 
Channel = 0
'now read A/D value from channel 0
Do
W = Getadc(channel)
Print "Channel " ; Channel ; " value " ; W
Incr Channel
If Channel > 7 Then Channel = 0
Loop
End
 
'The new M163 has options for the reference voltage
'For this chip you can use the additional param :
'Config Adc = Single , Prescaler = Auto, Reference = Internal
'The reference param may be :
'OFF : AREF, internal reference turned off
'AVCC : AVCC, with external capacitor at AREF pin
'INTERNAL : Internal 2.56 voltage reference with external capacitor ar AREF pin
 
'Using the additional param on chip that do not have the internal reference will have no effect.

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