$EEPROM/de

From MCS Wiki AVR
< $EEPROM(Difference between revisions)
Jump to: navigation, search
 
(Example)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== (**COPIED FROM ENGLISH PAGE**) === <span class="f_Header">Action</span><br/> =
+
= <span class="f_Header">Funktion</span><br/> =
  
Instruct the compiler to store the data in the DATA lines following the $EEPROM directive in an EEP file.
+
Weist den Compiler an, Daten in den nachfolgenden DATA-Zeilen in einer EEP-Datei zu speichern.
  
 
<span style="font-family: 'Arial';  color: #000000">&nbsp;</span>
 
<span style="font-family: 'Arial';  color: #000000">&nbsp;</span>
Line 15: Line 15:
 
<span style="font-family: 'Arial';  color: #000000">&nbsp;</span>
 
<span style="font-family: 'Arial';  color: #000000">&nbsp;</span>
  
= <span class="f_Header">Remarks</span><br/> =
+
= <span class="f_Header">Anmerkungen</span><br/> =
  
The AVR has built-in EEPROM. With the WRITEEEPROM and READEEPROM statements, you can write to and read from the EEPROM.
+
Die AVR-Mikrocontroller haben einen integrierten EEPROM-Speicher. Mit den WRITEEEPROM bzw. READEEPROM Befehlen kann man in den EEPROM-Speicher schreiben bzw. daraus lesen..
  
To store information in the EEPROM, you can add DATA lines to your program that hold the data that must be stored in the EEPROM.
+
Es wird eine separate EEP-Datei erzeugt, die benutzt werden kann um den EEPROM-Speicher zu brennen.
 
+
A separate file is generated with the EEP extension. This file can be used to program the EEPROM.
+
  
 
<span style="font-family: 'Arial';  color: #000000">&nbsp;</span>
 
<span style="font-family: 'Arial';  color: #000000">&nbsp;</span>
  
The compiler must know which DATA must go into the code memory and which into the EEPROM memory and therefore two compiler directives were added.
+
Der Compiler muss mitgeteilt bekommen, welche DATA-Werte in den Programmspeicher gespeichert werden sollen und welche DATA-Werte im EEPROM-Speicher. Dafür gibt es zwei Compiler-Direktiven:
 
+
 
<span style="font-family: 'Arial';  color: #000000">&nbsp;</span>
 
<span style="font-family: 'Arial';  color: #000000">&nbsp;</span>
  
Line 33: Line 30:
 
<span style="font-family: 'Arial';  color: #000000">&nbsp;</span>
 
<span style="font-family: 'Arial';  color: #000000">&nbsp;</span>
  
$EEPROM tells the compiler that the DATA lines following the compiler directive must be stored in the EEP file.
+
$EEPROM weist den Compiler an, die Werte der nachfolgenden Werte in der EEP-DAtei zu speichern.
  
To switch back to the default behavior of the DATA lines, you must use the $DATA directive.
+
Um zum Standardverhalten der DATA-Zeilen zurückzuschalten muss man die $DATA-Direktive benutzen.
  
 
<span style="font-family: 'Arial';  color: #000000">&nbsp;</span>
 
<span style="font-family: 'Arial';  color: #000000">&nbsp;</span>
  
The READ statement that is used to read the DATA info may only be used with normal DATA lines. It does not work with DATA stored in EEPROM.
+
Der READ-Befehl zum Lesen der DATA-Werte kann nur mit normalen DATA-Zeilen benutzt werden. Es funktioniert nicht mit DATA-Werten, die im EEPROM-Speicher gespeichert sind.
  
 
<span style="font-family: 'Arial';  color: #000000">&nbsp;</span>
 
<span style="font-family: 'Arial';  color: #000000">&nbsp;</span>
  
[[File:Notice.jpg|left|Notice.jpg]]&nbsp;Do not confuse $DATA directive with the DATA statement.
+
[[File:Notice.jpg|left|Notice.jpg]]&nbsp; Verwechseln Sie nicht die $DATA-Direktive mit dem DATA-Befehl.
 
+
 
<span style="font-family: 'Arial';  color: #000000">&nbsp;</span>
 
<span style="font-family: 'Arial';  color: #000000">&nbsp;</span>
  
So while normal DATA lines will store the specified data into the code memory of the micro which is called the flash memory, the $EEPROM and $DATA will cause the data to be stored into the EEPROM. The EEP file is a binary file. The [[$EEPROMHEX]] directive can be used to create Intel HEX records in the EEP file
+
Während normale DATA-Zeilen die Werte im Programmspeicher des Mikrocontrollers (Flash-Speicher) speichern bewirken $EEPROM und DATA das Speichern der Werte im EEPROM-Speicher. Die EEP-Datei ist eine binäre Datei. Die [[$EEPROMHEX]] Direktive kann benutzt werden um Intel Hex Records in der EEP-Datei zu erzeugen.
  
 
<span style="font-family: 'Arial';  color: #000000">&nbsp;</span>
 
<span style="font-family: 'Arial';  color: #000000">&nbsp;</span>
Line 53: Line 49:
 
<span style="font-family: 'Arial';  color: #000000">&nbsp;</span>
 
<span style="font-family: 'Arial';  color: #000000">&nbsp;</span>
  
= <span class="f_Header">See also</span><br/> =
+
= <span class="f_Header">Siehe auch</span><br/> =
  
 
[[READEEPROM]] , [[WRITEEEPROM]] , [[DATA]] , [[$EEPROMHEX]]
 
[[READEEPROM]] , [[WRITEEEPROM]] , [[DATA]] , [[$EEPROMHEX]]
Line 69: Line 65:
 
<span style="font-family: 'Arial';  color: #000000">&nbsp;</span>
 
<span style="font-family: 'Arial';  color: #000000">&nbsp;</span>
  
= <span class="f_Header">Example</span><br/> =
+
= <span class="f_Header">Beispiel</span><br/> =
  
 
<source lang="bascomavr">
 
<source lang="bascomavr">
Line 77: Line 73:
 
'suited for demo : yes
 
'suited for demo : yes
 
'commercial addon needed : no
 
'commercial addon needed : no
'purpose : demonstrates $DATA directive
+
'purpose : Beispielprogramm für die $DATA Direktive
 
'-------------------------------------------------------------------------------
 
'-------------------------------------------------------------------------------
  
 
$regfile = "2313def.dat"
 
$regfile = "2313def.dat"
 
$baud = 19200
 
$baud = 19200
$crystal = 4000000 ' 4 MHz crystal
+
$crystal = 4000000 ' 4 MHz Quarz
  
  
 
Dim B As Byte
 
Dim B As Byte
Readeeprom B , 0 'now B will be 1
+
Readeeprom B , 0 'Jetzt ist B 1
 
End
 
End
 
   
 
   

Latest revision as of 23:36, 9 March 2013

Contents

Funktion

Weist den Compiler an, Daten in den nachfolgenden DATA-Zeilen in einer EEP-Datei zu speichern.

 

 

Syntax

$EEPROM

 

 

Anmerkungen

Die AVR-Mikrocontroller haben einen integrierten EEPROM-Speicher. Mit den WRITEEEPROM bzw. READEEPROM Befehlen kann man in den EEPROM-Speicher schreiben bzw. daraus lesen..

Es wird eine separate EEP-Datei erzeugt, die benutzt werden kann um den EEPROM-Speicher zu brennen.

 

Der Compiler muss mitgeteilt bekommen, welche DATA-Werte in den Programmspeicher gespeichert werden sollen und welche DATA-Werte im EEPROM-Speicher. Dafür gibt es zwei Compiler-Direktiven:  

$EEPROM and $DATA.

 

$EEPROM weist den Compiler an, die Werte der nachfolgenden Werte in der EEP-DAtei zu speichern.

Um zum Standardverhalten der DATA-Zeilen zurückzuschalten muss man die $DATA-Direktive benutzen.

 

Der READ-Befehl zum Lesen der DATA-Werte kann nur mit normalen DATA-Zeilen benutzt werden. Es funktioniert nicht mit DATA-Werten, die im EEPROM-Speicher gespeichert sind.

 

Notice.jpg
  Verwechseln Sie nicht die $DATA-Direktive mit dem DATA-Befehl.

 

Während normale DATA-Zeilen die Werte im Programmspeicher des Mikrocontrollers (Flash-Speicher) speichern bewirken $EEPROM und DATA das Speichern der Werte im EEPROM-Speicher. Die EEP-Datei ist eine binäre Datei. Die $EEPROMHEX Direktive kann benutzt werden um Intel Hex Records in der EEP-Datei zu erzeugen.

 

 

Siehe auch

READEEPROM , WRITEEEPROM , DATA , $EEPROMHEX

 

 

ASM

NONE

 

 

Beispiel

'-------------------------------------------------------------------------------
'copyright : (c) 1995-2005, MCS Electronics
'micro : AT90S2313
'suited for demo : yes
'commercial addon needed : no
'purpose : Beispielprogramm für die $DATA Direktive
'-------------------------------------------------------------------------------
 
$regfile = "2313def.dat"
$baud = 19200
$crystal = 4000000 ' 4 MHz Quarz
 
 
Dim B As Byte
Readeeprom B , 0 'Jetzt ist B 1
End
 
 
Dta:
$eeprom
Data 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8
$data
End

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