36
keyboard can send another scan code. If the receiver never pulls the clock line low, then
the keyboard will send scan codes whenever a key is pressed.
•
Figure 10:
Keyboard data transmission waveforms.
The VHDL code for this example is shown in . The inputs and outputs of the circuit as
defined in the entity declaration are as follows:
rst:
This output drives the reset pin of the microcontroller on the XS Board.
oeb:
This output drives the output-enable pin of the RAM on the XS Board.
kb_data:
The scan code bits enter through this input.
kb_clk:
The keyboard clock signal enters through this input.
db:
These outputs drive the segments of the bargraph LED on the XStend Board.
rsb:
These outputs drive the segments of the right LED digit on the XStend Board.
Within the main body of the architecture section, these operations occur:
Lines 22 & 23:
The microcontroller reset pin and the RAM output-enable pin are driven
high so these chips cannot interfere while receiving data from the keyboard.
Lines 25 & 26:
The keyboard clock passes through an input buffer and then a global clock
buffer before it reaches the rest of the circuitry. (These buffers are declared on lines
18 and 19, respectively.) The global clock buffer distributes the clock signal with
minimal skew in the XS40 Board FPGA. These statements are not used with the
CPLD in the XS95 Board.
gather_scancode:
On every falling edge of kb_clk, this process shifts the data bit on the
kb_data input into the most-significant bit of a 10-bit shift register. After 11 clock
cycles, the lower 8 bits of the register will contain the scan code, the upper 2 bits will
store the stop and parity bits, and the start bit will have been shifted through the entire
register and discarded.
Line 38:
The value in the shift register is inverted and applied to the segments of the LED
bargraph. Since the bargraph segments are active-low, a segment will light for every
‘1’ bit in the shift register. The LED segment drivers are not registered so there will be
some flickering as the shift register contents change.
Содержание XStend XS40
Страница 17: ...16 Figure 5 Programmer s model of the XS40 XStend Board combination...
Страница 18: ...17...
Страница 20: ......
Страница 31: ......
Страница 33: ......
Страница 41: ......
Страница 58: ...Appendix A XStend Schematics...
Страница 59: ...XStend V1 3 XS Board Connectors...
Страница 60: ...XStend V1 3 RAM...
Страница 61: ......
Страница 62: ...XStend V1 3 Stereo Codec...
Страница 63: ......