Analog essentials, Getting started guide, For lx9 and nexys-3 – Maxim Integrated Analog Essentials Getting Started Guide for LX9 and Nexys3 User Manual
Page 21

Analog Essentials
Getting Started Guide
21
For LX9 and Nexys-3
Appendix A: Project Notes
1.
Each active Pmod port has a dedicated I
2
C port, SPI port UART and octal GPIO. These communications
peripherals are multiplexed to the physical ports via an HDL designed multiplexer. (Refer to the diagram in the
Typical System Architecture section.) An example of this can be seen in the maximPMOD.c file at about the
midpoint, as shown in the clip below.
Also, note that all 4 Pmod ports on the Nexys-3 board are driven in this manner. However, due to gate count
limitation in the LX9, only one of its Pmod ports is actively driven by this configuration.
2.
The functions in maximDeviceSpecificUtilities.c are used to access the major functionality provided by the
Maxim ICs. In general, these functions return an integer value (TRUE/FALSE) that describes whether or not the
function successfully completed. Although it is not required to check this return value, it is good programming
practice to do so.
3.
Functions will typically require a peripheral port address. These ports are assigned sequentially from the sets of
I
2
C, SPI, UART and GPIO peripherals in the design, and are named from ports 0..3. (Again, the Nexys-3 design
includes 4 ports and the LX9 design includes one port.) Examples include:
a.
XPAR_IIC_0_BASEADDR, XPAR_IIC_1_BASEADDR, XPAR_IIC_2_BASEADDR, etc.
b.
XPAR_SPI_0_BASEADDR, XPAR_SPI_1_BASEADDR, etc
c.
XPAR_AXI_UARTLITE_0_BASEADDR, XPAR_AXI_UARTLITE_0_BASEADDR, etc
4.
GPIO calls receive a pointer to a Xilinx XGpio instance
a.
XGpio portA;
b.
XGpio_Initialize(&portA, XPAR_AXI_GPIO_0_DEVICE_ID);
Since the functions return TRUE/FALSE as a pass/fail indication, when the functions return a value, it is passed back to
the calling function via a pointer.