Digital Signal Processing Reference
In-Depth Information
SPI and I 2 C both offer good support for communication with low-speed
devices. SPI is better suited to applications that need to transfer higher
bandwidth data streams without the need for explicit address information. Some
of the most common SPI examples are analog-to-digital (A/D) and digital-to-
analog (D/A) converters used to continuously sample or output analog signals.
Since addressing is required for I 2 C, it requires more hardware, but with
advances in VLSI technology these additional hardware costs are minimal. In
2005, one FPGA vendor calculated that a single I/O pin on an FPGA package
costs as much as 50,000 transistors inside the chip.
12.5 For Additional Information
The topics Parallel Port Complete and Serial Port Complete by Jan Axelson
published by Lakeview Research ( www.lvr.com ) contain complete details on
using parallel and serial ports. The full I 2 C specification is available from
Philips Semiconductors ( www.phillipssemiconductor.com ) and SMB at
( www.smbus.org ). The Motorola MC68HC11 data manual
( www.freescale.com ) and various National Semiconductor manuals
( www.national.com ) have more information on SPI. Analog Devices
( www.analogdevices.com ) makes a wide variety of A/D and D/A converters
with SPI and parallel interfaces.
12.6 Laboratory Exercises
1. Interface a printer with a parallel port to the UP3 board's parallel port. Connect the two
devices using a printer cable. Design logic using a state machine or a processor core for
the FPGA to transfer data and handle the handshake lines. You may want to use an older
printer so that any problems with your design will not damage the printer. Be careful not
to generate tri-state bus conflicts on the parallel data lines by making sure you drive the
data direction bit to the proper state. Have the UP3 print a short ASCII message on the
printer ending with an ASCII form or page feed to print the message on a page. A form
feed may be needed to cause the printer to print since most printers store characters in an
internal page buffer.
2. Interface the FPGA board's serial port (DE1, DE2 or UP3) to a PC serial port using a
serial cable. Run a serial communications program on the PC. Send a short message to
the PC from the FPGA and display the data from the PC on the FPGA board's LCD
panel or seven-segment LEDs.
3. Design an I 2 C interface for the UP3 board's real-time clock chip. Display the time from
the chip on the UP3 board's LCD display. Don't forget to check the UP3 board's jumper
settings and battery for the real-time clock chip. The data sheet for the clock chip
contains address and data formats.
Search WWH ::




Custom Search