MAKEBCD/de

From MCS Wiki AVR
< MAKEBCD(Difference between revisions)
Jump to: navigation, search
(Created page with "= <span class="f_Header">Action</span> = Convert a variable into its BCD value. <span style="font-family: Arial;"> </span> <span style="font-family: Arial;"> </sp...")
 
(Anmerkungen)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== (**COPIED FROM ENGLISH PAGE**) === <span class="f_Header">Action</span> =
+
= <span class="f_Header">Funktion</span> =
  
Convert a variable into its BCD value.
+
Konvertiert den Wert einer Variablen in das BCD Format.
  
 
<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="margin: 0px 0px 0px 4px; padding: 0px;">
{| width="601" cellspacing="0" cellpadding="1" border="1" style="border: 2px solid rgb(0, 0, 0); border-spacing: 0px; border-collapse: collapse;"
+
{| style="border: 2px solid rgb(0, 0, 0); border-collapse: collapse; border-spacing: 0px;" width="601" cellpadding="1" cellspacing="0" border="1"
 
|- style="vertical-align: top;"
 
|- style="vertical-align: top;"
| valign="top" width="10%" style="width: 56px; border: 1px solid rgb(0, 0, 0);" |  
+
| style="border: 1px solid rgb(0, 0, 0); width: 56px;" width="10%" valign="top" |  
 
var1
 
var1
  
| valign="top" width="100%" style="width: 536px; border: 1px solid rgb(0, 0, 0);" |  
+
| style="border: 1px solid rgb(0, 0, 0); width: 536px;" width="100%" valign="top" |  
Variable that will be assigned with the converted value.
+
Variable der der konvertierten Wert zugewiesen wird.
  
 
|- style="vertical-align: top;"
 
|- style="vertical-align: top;"
| valign="top" width="10%" style="width: 56px; border: 1px solid rgb(0, 0, 0);" |  
+
| style="border: 1px solid rgb(0, 0, 0); width: 56px;" width="10%" valign="top" |  
 
Var2
 
Var2
  
| valign="top" width="100%" style="width: 536px; border: 1px solid rgb(0, 0, 0);" |  
+
| style="border: 1px solid rgb(0, 0, 0); width: 536px;" width="100%" valign="top" |  
Variable that holds the decimal value.
+
Variable die&nbsp;den&nbsp;zu konvertierenden Dezimalwert liefert.
  
 
|}
 
|}
 
</div>
 
</div>
<span style="font-family: Arial;">&nbsp;</span>
+
<span style="font-family: arial;">&nbsp;</span>
  
When you want to use an I2C clock device, which stores its values as BCD values you can use this function to convert variables from decimal to BCD.
+
Wenn sie mit beispielsweise mit einer I²C-Uhr arbeiten die&nbsp;ihre Werte BCD-kodiert verarbeitet, kann diese Funktion dazu verwendet werden,
  
For printing the BCD value of a variable, you can use the BCD() function which converts a BCD number into a BCD string.
+
Dezimalwerte in das BCD-Format zu überführen.
  
<span style="font-family: Arial;">&nbsp;</span>
+
Um mit Print eine Zahl im BCD-Format auszugeben, konvertiert die BCD()-Funktion einen BCD-Wert zu einer BCD-Zeichenkette (String).
  
<span style="font-family: Arial;">&nbsp;</span>
+
&nbsp;
 +
 
 +
<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> =
  
 
[[MAKEDEC]]&nbsp;,&nbsp;[[BCD]]&nbsp;,&nbsp;[[MAKEINT]]
 
[[MAKEDEC]]&nbsp;,&nbsp;[[BCD]]&nbsp;,&nbsp;[[MAKEINT]]
Line 52: Line 56:
 
<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 11:15, 5 March 2013

Contents

Funktion

Konvertiert den Wert einer Variablen in das BCD Format.

 

 

Syntax

var1 = MAKEBCD(var2)

 

 

Anmerkungen

var1

Variable der der konvertierten Wert zugewiesen wird.

Var2

Variable die den zu konvertierenden Dezimalwert liefert.

 

Wenn sie mit beispielsweise mit einer I²C-Uhr arbeiten die ihre Werte BCD-kodiert verarbeitet, kann diese Funktion dazu verwendet werden,

Dezimalwerte in das BCD-Format zu überführen.

Um mit Print eine Zahl im BCD-Format auszugeben, konvertiert die BCD()-Funktion einen BCD-Wert zu einer BCD-Zeichenkette (String).

 

 

 

Siehe auch

MAKEDEC , BCD , MAKEINT

 

 

Beispiel


Dim A As Byte
A = 65
Lcd A
Lowerline
Lcd Bcd(a)
A = Makebcd(a)
Lcd " " ; A
End

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