123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- <html>
- <head>
- <title>Keyboard</title>
- </head>
- <body bgcolor="FFFFFF">
- <h1><img align="center" src="../../../../en/icons/keyboard.gif" width="32" height="32">
- <em>Keyboard</em></h1>
- <p><table>
- <tr><td><strong>Library:</strong></td>
- <td><a href="index.html">Input/Output</a></td></tr>
- <tr><td><strong>Introduced:</strong></td>
- <td>2.2.0</td></tr>
- <tr><td valign="top"><strong>Appearance:</strong></td>
- <td valign="top"><img src="../../../../en/img-libs/keyboard.png" width="148" height="28"></td></tr>
- </table></p>
- <h2>Behavior</h2>
- <p>This component allows the circuit to read keys typed from the keyboard -
- as long as the keys are representable in the 7-bit ASCII code.
- After clicking the component using the poke tool, the user can type characters,
- which accumulate in a buffer. At all times, the ASCII value for the leftmost
- character in the buffer is sent out the rightmost output. When the clock input
- is triggered, the leftmost character disappears from the buffer and the new
- leftmost character is sent on the rightmost output.</p>
- <p>The supported characters for the buffer include all the printable ASCII
- characters, as well as space, newline, backspace, and control-L. In addition,
- the left-arrow and right-arrow keys move the cursor within the buffer, and the
- delete key deletes the character to the right of the cursor (if any).</p>
- <p>The component is asynchronous in the sense that when the buffer is empty and
- the user types a character, that character is sent immediately as an output,
- without any wait for a clock pulse.</p>
- <h2>Pins</h2>
- <dl>
- <dt>West edge, marked by a triangle (input, bit width 1)</dt>
- <dd>Clock - when triggered while the read-enable pin isn't 0, the leftmost
- character from the buffer is deleted,
- and the outputs are updated to reflect the buffer's new status.</dd>
- <dt>South edge, leftmost pin (input, bit width 1)</dt>
- <dd>Read Enable - when 1 (or floating or error), a clock edge will consume
- the leftmost character from the buffer. The clock input is ignored when
- Read Enable is 0.</dd>
- <dt>South edge, second pin from left (input, bit width 1)</dt>
- <dd>Clear - when 1, the buffer is emptied and does not accept further
- characters.</dd>
- <dt>South edge, second pin from right (output, bit width 1)</dt>
- <dd>Available - this is 1 when the buffer contains at least one character
- and 0 when the buffer is empty.</dd>
- <dt>South edge, rightmost pin (output, bit width 7)</dt>
- <dd>Data - the 7-bit ASCII code for the leftmost character in the buffer,
- or 0 if the buffer is empty.</dd>
- </dl>
- <h2>Attributes</h2>
- <dl>
- <dt>Buffer Length</dt>
- <dd>The number of characters that the buffer can hold at once.</dd>
- <dt>Trigger</dt>
- <dd>If the value is <q>Rising Edge,</q> then when the clock input changes
- from 0 to 1, the leftmost character is consumed (when enabled by the Read
- Enable input). If it is <q>Falling Edge,</q>, then this happens when the
- clock input changes from 1 to 0.</dd>
- </dl>
- <h2>Poke Tool Behavior</h2>
- <p>Pressing the mouse button into the component gives keyboard focus to the
- component, and a vertical-bar cursor will be displayed.</p>
- <p>Each character typed will then be inserted into the buffer, as long as the
- buffer hasn't reached its capacity and the character is one of those that the
- component supports: the printable characters within the 7-bit ASCII code, as
- well as space, backspace, newline, and control-L. Additionally, the user may
- type the left-arrow and right-arrow keys to change the location of the cursor
- within the buffer, and the user may type the delete key to delete the buffer
- character (if any) just to the right of the cursor.</p>
- <h2>Text Tool Behavior</h2>
- <p>None.</p>
- <p><a href="../index.html">Back to <em>Library Reference</em></a></p>
- </body>
- </html>
|