This example design, which can be run on any of Altium's NanoBoards, implements a simple calculator. The design demonstrates use of the Custom Instrument component, which allows a customized instrument panel to be built for monitoring and controlling signals within an FPGA design. It also demonstrates use of the C Code Symbol, which allows custom logic to be designed using the C programming language.
The GUI for the calculator is defined as part of the Custom Instrument's configuration, along with code to handle actions associated with IO. The custom logic underlying the C Code Symbol is defined in the file
CalculatorFSM.c. The code here implements a simple calculator state machine. Each key entered on the user interface is forwarded to the
ProcessKey() function, which will update the calculator's internal state accordingly and return the value that should be displayed on the user interface.
Altium Designer projects included in this download: