Altera, APEX, ACEX, FLEX, MegaWizard, and Nios are trademarks and/or service marks of Altera
Corporation in the United States and other countries. Altera acknowledges the trademarks of other
organizations for their respective products or services mentioned in this document. Altera products are
protected under numerous U.S. and foreign patents and pending applications, maskwork rights, and
copyrights. Altera warrants performance of its semiconductor products to current specifications in accordance
with Altera’s standard warranty, but reserves the right to make changes to any products and services at any
time without notice. Altera assumes no responsibility or liability arising out of the application
or use of any information, product, or service described herein except as expressly agreed to
in writing by Altera Corporation. Altera customers are advised to obtain the latest version of
device specifications before relying on any published information and before placing orders
for products or services.
Copyright 2001 Altera Corporation. All rights reserved.
101 Innovation Drive
San Jose, CA 95134
(408) 544-7000
http://www.altera.com
Applications Hotline:
(800) 800-EPLD
Customer Marketing:
(408) 544-7104
Literature Services:
lit_req@altera.com
Nios Embedded Processor SPI Peripheral Data Sheet
8Altera Corporation
Printed on Recycled Paper.
Select Register (Internal Address 5)
The select register sets the select bit mask for slave devices driven by the
SPI bus master device. The select register is only present when the SPI
peripheral is configured as a master device.
The select register can be used to address up to 16 slave devices by setting
the corresponding bit. For example, to select slave device 0, the user sets
bit 0 in the select register to a true value (1).
The Nios SPI master device can also interface to multiple slave devices
simultaneously by setting the select bits for each desired device. For
example, to select slave devices 1, 5, and 6, users write a 1 to bits 1, 5, and
6 of the select register.
A reset clears every bit of the select register except bit 0. Thus, after a
device reset, slave device 0 will automatically be selected.
SPI Software
Routines
If there is one or more SPI peripheral present in the Nios system, the SPI
peripheral software routines are available in the Nios library (.lib folder
in the custom software development kit).
fFor more information regarding software routine calls and custom
software development kits, please refer to the Nios Software Development
Reference Manual.