Tutorial - Getting Started with the Software Platform Builder
This tutorial will get you started with the Software Platform Builder. Upon completion you will have created an (NanoBoard NB2) application that reads characters from the PS/2 keyboard and echoes them on the Terminal Instrument. To do this the software system needs to do all of the following tasks:
- At the lowest level the application should gain access to the PS/2 port by defining the base address of the PS/2 port and the addresses to access the clock lines and the data lines of the port.
- At the next level, the application needs to be ready to receive an interrupt from the keyboard on the PS/2 peripheral. The application must correctly handle the interrupt and read incoming data from the data line on the PS/2 port. The keyboard sends serial data in 11-bit frames. Multiple frames make up a scancode which represent each possible event on the keyboard (a key press or a key release).
- At a higher level the application needs to collect the data and store the actual scan codes. A scan code can be 1 to 8 bytes long. (For example, 0xC1 corresponds to pressing the 'A'-key, 0xF0 0xC1 corresponds to releasing the 'A'-key.).
- At the highest level, the application needs to interpret the scan codes by mapping them to the correct keys that were pressed on the keyboard. The application must also detect key combinations like Shift + 'A'. For this key combination, the application must remember the fact that the scancode for the Shift-key press (also called a make code) was received before it received the 'A'-key make code. The application must correctly interpret this as a capital 'A'. The interpreted input should be buffered correctly.
- Finally, the application must write the interpreted character to the terminal instrument.
Usually this would require a lot of programming, but with the Software Platform Builder most of the work is done for us. With the Software Platform Builder you can select ready made software modules to create a software platform that takes care of the lower level processes. We can then use the software platform's API at the highest level to write our application.
Follow each of the linked pages below, in sequence, to complete the tutorial and implement the example design:
First Steps
Create the Software Platform
Write the Application Code
Build and Download
Simplify the Application Code
This tutorial assumes a working knowledge of the basics of FPGA design and soft processors within Altium Designer. To get familiar with the basics of FPGA design, including project creation, component placement, wiring, configuration and design processing, see Tutorial - Getting Started with FPGA Design. To get familiar with using soft processors within Altium Designer check out