User guide
SFSU - Embedded Systems Tutorial Nano- Electronics & Computing Research Lab
69
Serial Peripheral Interface (SPI) and a Parallel I/0 (PIO) peripheral implement the touch screen
interface. The SPI peripheral communicates with the Analog Devices AD7843, touch screen digitizer chip
to signal pen_move events. A single PIO captures pen interrupt events, transitions on the pen_down line
from the AD7843 chip to indicate pen_down and pen_up events. The Nios II processor in the system runs
the software that drives the SPI and PIO peripherals. The main commands, which we use in the project to
implement the touch interface, are touch_panel_spi which implements the SPI interface are
touch_panel_spi which implements pen interrupt interface.
The T-Pad has SPI for recognizing touch on a resistive screen. The touch is communicated with the
processor using Serial Peripheral Interface. We need to designate two parallel input ports, one with
interrupt for pen down, for recognizing that the screen is touched. The PIO with interrupt is known as
pen_irq. The PIO without the interrupt is used to indicate if the touch interface is busy or not. If busy, the
touch will not sense any interrupt i.e., touch on the screen.
Software
The LCD screen is initialized and ALU Options will be displayed. Switches are toggled to change the
number values and for a specific ALU operation, screen is touched. The result is displayed on the LCD
Screen and updated every time switch is toggled and/or screen is touched.