ISCHARWAITING/de

(Difference between revisions)
Jump to: navigation, search
((**COPIED FROM ENGLISH PAGE**) =)
(Remarks)
Line 17: Line 17:
 
<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;"
Line 25: Line 25:
  
 
| valign="top" width="100%" style="width: 410px; border: 1px solid rgb(0, 0, 0);" |  
 
| valign="top" width="100%" style="width: 410px; border: 1px solid rgb(0, 0, 0);" |  
Byte, Integer, Word or Long variable.
+
Byte-, Integer-, Word- oder Long-Variable.
  
 
|- style="vertical-align: top;"
 
|- style="vertical-align: top;"
Line 32: Line 32:
  
 
| valign="top" width="100%" style="width: 410px; border: 1px solid rgb(0, 0, 0);" |  
 
| valign="top" width="100%" style="width: 410px; border: 1px solid rgb(0, 0, 0);" |  
A constant number that identifies the opened channel.
+
Konstante Nummer des geöffneten Kanals.
  
 
|}
 
|}
Line 38: Line 38:
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
  
If there is no character waiting, a zero will be returned.
+
Wenn kein Zeichen ansteht dann wird eine Null (0) zurückgegeben.
  
If there is a character waiting, a one (1) will be returned.
+
Wenn ein Zeichen ansteht dann wird eine Eins (1) zurückgegeben.
  
The character is not retrieved or altered by the function.
+
Das Zeichen wird durch die Funktion nicht empfangen oder geändert.
  
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
  
While the Inkey() will get the character from the HW UART when there is a character in the buffer, it will return a zero when the character is zero. This makes it unusable to work with binary data that might contain the value 0.
+
Inkey() empfängt ein Zeichen aus der HW-UART wenn ein Zeichen im Buffer ist. Wenn kein Zeichen ansteht dann gibt Inkey() eine Null zurück. Dadurch ist Inkey() nutzlos wenn ninäre Daten empfangen werden, die auch Nullen enthalten können.
  
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
  
With IsCharWaiting() you can first check for the presence of a character and when the function returns 1, you can retrieve the character with Inkey or Waitkey.
+
Mit IsCharWaiting() kann man vorher prüfen ob ein Zeichen ansteht und wenn die Funktion eine Eins zurückgibt dann kann man das Zeichen mit Inkey oder Waitkey empfangen.
  
 
&nbsp;
 
&nbsp;
  
IsCharWaiting can NOT be used with a software uart (SW-UART). This because a SW-UART does not buffer the data is receives or sends.
+
IsCharWaiting kann nicht mit der Software UART (SW-UART) benutzt werden weil die SW-Uart die empfangenen und gesendeten Zeichen nicht puffert.
  
 
&nbsp;
 
&nbsp;

Revision as of 23:54, 21 February 2013

Contents

Funktion

Gibt eine Eins (1) zurück wenn ein Zeichen im Hardware-Buffer ansteht.

 

 

Syntax

var = ISCHARWAITING()

var = ISCHARWAITING(#channel)

 

 

Anmerkungen

Var

Byte-, Integer-, Word- oder Long-Variable.

Channel

Konstante Nummer des geöffneten Kanals.

 

Wenn kein Zeichen ansteht dann wird eine Null (0) zurückgegeben.

Wenn ein Zeichen ansteht dann wird eine Eins (1) zurückgegeben.

Das Zeichen wird durch die Funktion nicht empfangen oder geändert.

 

Inkey() empfängt ein Zeichen aus der HW-UART wenn ein Zeichen im Buffer ist. Wenn kein Zeichen ansteht dann gibt Inkey() eine Null zurück. Dadurch ist Inkey() nutzlos wenn ninäre Daten empfangen werden, die auch Nullen enthalten können.

 

Mit IsCharWaiting() kann man vorher prüfen ob ein Zeichen ansteht und wenn die Funktion eine Eins zurückgibt dann kann man das Zeichen mit Inkey oder Waitkey empfangen.

 

IsCharWaiting kann nicht mit der Software UART (SW-UART) benutzt werden weil die SW-Uart die empfangenen und gesendeten Zeichen nicht puffert.

 

 

See also

WAITKEY , INKEY

 

 

Example


$regfile = "m48def.dat" ' specify the used micro
$crystal = 4000000 ' used crystal frequency
$baud = 19200 ' use baud rate
$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
 
Dim A As Byte , S As String * 2
Do
 A = Ischarwaiting()
If A = 1 Then 'we got something
 A = Waitkey() 'get it
 Print "ASCII code " ; A ; " from serial"
End If
Loop Until A = 27 'until ESC is pressed

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