Using MAX 3000A Devices as a Microcontroller I/O Expander

Similar documents
Using MAX II & MAX 3000A Devices as a Microcontroller I/O Expander

Matrices in MAX II & MAX 3000A Devices

Implementing LED Drivers in MAX Devices

Active Serial Memory Interface

Implementing LED Drivers in MAX and MAX II Devices. Introduction. Commercial LED Driver Chips

DSP Development Kit, Stratix II Edition

Using the Nios Development Board Configuration Controller Reference Designs

Estimating Nios Resource Usage & Performance

Simulating the PCI MegaCore Function Behavioral Models

White Paper Configuring the MicroBlaster Passive Serial Software Driver

Introduction. Design Hierarchy. FPGA Compiler II BLIS & the Quartus II LogicLock Design Flow

FPGA Design Security Solution Using MAX II Devices

Simple Excalibur System

Using the Serial FlashLoader With the Quartus II Software

Simultaneous Multi-Mastering with the Avalon Bus

POS-PHY Level 4 MegaCore Function

UTOPIA Level 2 Slave MegaCore Function

Cyclone II FPGA Family

Nios Soft Core Embedded Processor

Enhanced Configuration Devices

Table 1 shows the issues that affect the FIR Compiler v7.1.

FPGAs Provide Reconfigurable DSP Solutions

AIRbus Interface. Features Fixed width (8-, 16-, or 32-bit) data transfers (dependent on the width. Functional Description. General Arrangement

POS-PHY Level 4 POS-PHY Level 3 Bridge Reference Design

White Paper Using the MAX II altufm Megafunction I 2 C Interface

Arria II GX FPGA Development Board

FFT/IFFT Block Floating Point Scaling

DSP Builder. DSP Builder v6.1 Issues. Error When Directory Pathname is a Network UNC Path

Nios PIO. General Description. Functional Description

Simulating the Reed-Solomon Model

Excalibur Solutions DPRAM Reference Design

Table 1 shows the issues that affect the FIR Compiler, v6.1. Table 1. FIR Compiler, v6.1 Issues.

Nios II Embedded Design Suite 6.1 Release Notes

RapidIO MegaCore Function

Nios DMA. General Description. Functional Description

Video and Image Processing Suite

RapidIO Physical Layer MegaCore Function

ByteBlaster II Parallel Port Download Cable

Simulating the PCI MegaCore Function Behavioral Models

Using Flexible-LVDS I/O Pins in

Legacy SDRAM Controller with Avalon Interface

December 2002, ver. 1.3 Application Note 191. Six individual interrupts Six-bit priority scheme Five-bit priority scheme plus one individual interrupt

Figure 1. Device Package Ordering Information for Stratix, Stratix GX, Cyclone, APEX 20KC, APEX II, Mercury & Excalibur Devices EP1S 25 F 780 C 5 N

DDR & DDR2 SDRAM Controller

AN 547: Putting the MAX II CPLD in Hibernation Mode to Achieve Zero Standby Current

ZBT SRAM Controller Reference Design

PCI Express Multi-Channel DMA Interface

Design Verification Using the SignalTap II Embedded

AN423: Configuring the MicroBlaster Passive Serial Software Driver

DDR & DDR2 SDRAM Controller

Benefits of Embedded RAM in FLEX 10K Devices

Enhanced Configuration Devices

Excalibur Solutions Using the Expansion Bus Interface. Introduction. EBI Characteristics

SONET/SDH Compiler. Introduction. SONET/SDH Compiler v2.3.0 Issues

DDR & DDR2 SDRAM Controller Compiler

White Paper AHB to Avalon & Avalon to AHB Bridges

PCI Express Compiler. System Requirements. New Features & Enhancements

Introduction. Synchronous vs. Asynchronous Memory. Converting Memory from Asynchronous to Synchronous for Stratix & Stratix GX Designs

Implementing the Top Five Control-Path Applications with Low-Cost, Low-Power CPLDs

Nios Embedded Processor UART Peripheral

AN 549: Managing Designs with Multiple FPGAs

E3 Mapper MegaCore Function (E3MAP)

Toolflow for ARM-Based Embedded Processor PLDs

RapidIO MegaCore Function

DSP Builder Release Notes

Stratix FPGA Family. Table 1 shows these issues and which Stratix devices each issue affects. Table 1. Stratix Family Issues (Part 1 of 2)

DDR & DDR2 SDRAM Controller Compiler

Simulating Nios II Embedded Processor Designs

Simulating the ASMI Block in Your Design

White Paper. Floating-Point FFT Processor (IEEE 754 Single Precision) Radix 2 Core. Introduction. Parameters & Ports

Nios II Embedded Design Suite 7.1 Release Notes

RLDRAM II Controller MegaCore Function

T3 Framer MegaCore Function (T3FRM)

CORDIC Reference Design. Introduction. Background

Arria II GX FPGA Development Board

Using Flexible-LVDS Circuitry in Mercury Devices

ByteBlaster II Download Cable User Guide

Implementing LVDS in Cyclone Devices

White Paper The Need for a High-Bandwidth Memory Architecture in Programmable Logic Devices

FFT MegaCore Function

DDR & DDR2 SDRAM Controller Compiler

For Quartus II Software. This Quick Start Guide will show you how to set up a Quartus

POS-PHY Level 4 MegaCore Function (POSPHY4)

Remote Drive. Quick Start Guide. System Level Solutions, Inc. (USA) Murphy Avenue San Martin, CA (408) Version : 0.1.

Increasing Productivity with Altera Quartus II to I/O Designer/DxDesigner Interface

24K FFT for 3GPP LTE RACH Detection

Using VCS with the Quartus II Software

White Paper Understanding 40-nm FPGA Solutions for SATA/SAS

Implementing FIR Filters

Using DCFIFO for Data Transfer between Asynchronous Clock Domains

Stratix II vs. Virtex-4 Performance Comparison

SONET/SDH STS-12c/STM-4 Framer MegaCore Function (STS12CFRM)

SameFrame Pin-Out Design for FineLine BGA Packages

Exercise 1 In this exercise you will review the DSSS modem design using the Quartus II software.

Nios Timer. General Description. Functional Description

Design Guidelines for Using DSP Blocks

Using MicroC/OS-II RTOS with the Nios II Processor Tutorial Preliminary Information

Using Verplex Conformal LEC for Formal Verification of Design Functionality

Designing with ESBs in APEX II Devices

MAX 10 User Flash Memory User Guide

Transcription:

Using MAX 3000A Devices as a Microcontroller I/O Expander August 2003, Ver 1.0 Application Note 265 Introduction Advantages of Using MAX 3000A Devices Many microcontrollers and microprocessors limit I/O ports and pins to conserve pin counts and reduce package sizes. For many microcontroller (e.g., PIC, 051, and SX) or microprocessor basedsystems, the system design requires more I/O ports or pins than the microcontroller provides. To increase the number of I/O pins without changing the microcontroller, I/O expansion provides a solution. With up to 20 I/O pins and MultiVolt TM I/O capability, Altera MAX 3000A devices allow you to implement microcontroller I/O expansion in microcontroller or microprocessorbased systems. This application note explains how to implement a microcontroller I/O expander in MAX 3000A devices. A key advantage of using MAX 3000A devices as a microcontroller I/O expander is the integration of logic functions across your entire board. The flexibility of a programmable device means that not only can the I/O expansion function be implemented, but other functions can be integrated such as LED drivers or busbridging logic. This integration allows you to reduce component count across the board, minimizing cost and maximizing board space efficiency. Another advantage in using MAX 3000A devices is the MultiVolt I/O capability which enables MAX 3000A devices to interface to 5.0V, 3.3V, and 2.5V I/O pins. This capability allows you to implement voltagelevel shifting to interface older 5.0V devices with newer 3.3V or 2.5V devices or microcontrollers. The large numbers of I/O pins on MAX 3000A devices make it an ideal device for microcontroller I/O expansion. Table 1 shows the maximum user I/O pins available in MAX 3000A devices. The maximum I/O pins available are 20 which translates to 26, bit ports. Additionally, insystem programmability (ISP) means that these features come with the flexibility of reprogrammability on the board. Table 1. Maximum User I/O Pins in MAX 3000A Devices EPM3032A EPM3064A EPM312A EPM3256A EPM3512A Maximum User I/O Pins 34 66 9 161 20 Altera Corporation 1

Implementing a Microcontroller I/O Expander in MAX 3000A Devices The I/O expander design example includes four ports (A, B, C, and D) which can be independently programmed as I/O ports. Each port is bits wide and is bidirectional, becoming an input port when tristated. You can connect the microcontroller unit (MCU) port to or from any port (A, B, C, or D) to perform read and write operations. Figure 1 shows the block diagram of the design example for the microcontroller I/O expander. Figure 1. Block Diagram for Microcontroller I/O Expander Design Example in MAX 3000A Devices Input Data Latch Port A Port B MCU Port I/O Ports 4 2 I/O Setting Data Register 2 4 I/O Ports Output Data Latch Port C Port D CS RST CONF LOAD WR RD MODE 2 Altera Corporation

Table 2 lists all the functions of the input and output pins. Table 2. Input & Output Pins in a Microcontroller I/O Expander Example Design I/O Name Type Description Active MCU port Bidirectional bit bidirectional data lines that interface with the MCU data bus. The bit data can be written into or read out of the microcontroller I/O expander on the WR and RD signals. Configuration data is also transmitted through this port. The MODE signal determines whether the MCU port is a data or address bus. CS Input Input signal to select the device. Low RST Input Input signal to reset the device and all internal Low registers. CONF Input This control signal stores the sddress[5..0] from the MCU port on the falling edge of CONF into the configuration registers. Data on address[7..6] is ignored. (The operation will be discussed later in this application note.) LOAD Input This control signal stores the address[1..0] from the MCU port on the falling edge of LOAD into configuration registers. Data on address[7..2] is ignored. (The operation will be discussed later in this application note.) WR Input Input signal that causes the data on the MCU port to be written to the enabled port (A, B, C, or D). RD Input Input signal that enables the data bus transfer to the MCU port from the enabled port (A, B, C, or D). MODE Input Tristates the MCU port when this signal is high. The MCU port setting (input or output) depends on the configuration registers when MODE is low. Port A Bidirectional bit, generalpurpose I/O port that can be programmed to either output or input mode. Port B Bidirectional bit, generalpurpose I/O port that can be programmed to either output or input mode. Port C Bidirectional bit, generalpurpose I/O port that can be programmed to either output or input mode. Port D Bidirectional bit, generalpurpose I/O port that can be programmed to either output or input mode. Low Low Low Low Altera Corporation 3

Functional Description The microcontroller I/O expander operates as a slave that sends and receives data through the MCU port. Data is sent through the I/O expander at the hightolow transition of the WR signal (with CS set to low) and received at the hightolow transition of the RD signal (with CS set to low). Write Mode In write mode, the selected port (A, B, C, or D) is configured as an output port and the MCU port as an input port. Therefore, when the RW signal changes from high to low (with CS set to low), the data from the MCU port is written into the output data latch of the selected port. Read Mode In read mode, the selected port (A, B, C, or D) is configured as an input port and the MCU port as an output port. When the RD signal changes from high to low (with CS set to low), the data from the selected port is written into the input data latch of the MCU port. 1 During read and write operation, the MODE signal control pin must be set to low. See Design Verification on page 6 for an example of read and write operations. Configuration of the Microcontroller I/O Expander Configuration of the microcontroller I/O expander is used to determine whether the port is input or output and enabled or disabled. Activation of the new configuration occurs with a single configuration pulse of the CONF signal. Data controlling the microcontroller I/O expander is stored in a set of 6bit registers. Data to be written into these registers, consisting of 4 bits for I/O port configuration data and 2 bits for the enabled port address data, is placed on the input address bus (MCU port) with the MODE signal set to high and the CS signal set to low. Input data is stored in the configuration registers at the hightolow transition of the CONF signal input pin with the CS signal set to low. This transition causes the state of the microcontroller I/O expander to be set to the selected configuration. When the LOAD signal is asserted from high to low (with CS set to low), only 2 bits of the enabled port address data (bit1 and bit0) are stored in the configuration registers. Use the LOAD signal when you need to select the enabled port to perform read or write operation instead of configuring the ports. Figure 2 shows the functionality of every bit in the address bus during configuration mode. 4 Altera Corporation

Figure 2. I/O Expander Address Bus Configuration Function A7 A6 A5 A4 A3 A2 A1 A0 bit 76: bit 5: bit 4: bit 3: bit 2: bit 10: A7:A6: No functionality A5: Port D configuration bit 0 = Configured as input 1 = Configured as output A4: Port C configuration bit 0 = Configured as input 1 = Configured as output A3: Port B configuration bit 0 = Configured as input 1 = Configured as output A2: Port A configuration bit 0 = Configured as input 1 = Configured as output A1:A0: Port Address Table 3 shows the address contents to enable the particular I/O ports. Table 3. Port Addresses A1:A0 Port 00 A 01 B 10 C 11 D MCU port direction, input or output, cannot be directly configured by the user. It is configured internally by the selected enabled port. For example, if the enabled port is in input mode, the MCU port is set to an output mode. However, you can use the MODE signal control pin to tristate the MCU port so that it becomes an input port, allowing you access to the configuration registers. Reset mode is also supported in the microcontroller I/O expander reference design. When the RST signal is asserted (with CS set to low), the contents of all registers are reset to zero and the entire I/O expander is in its initial state, where all the ports (including the MCU port) are set to input mode. Altera Corporation 5

MAX 3000A Implementation The microcontroller I/O expander design example was targeted to 12macrocell MAX 3000A devices (EPM312ATC100) using the Quartus II software. The design utilization in the 12macrocell MAX 3000A device is shown in Table 4. The data in Table 4 shows that there is sufficient resources (I/O pins and macrocells) remaining in the device for the implementation of the other logic in the system. Table 4. Microcontroller I/O Expander EPM312A Utilization Resource Available Used Utilization (%) Macrocells 12 67 52 Flipflops 12 10 7 I/O Pins 0 51 63 Design Verification Design verification of a microcontroller I/O expansion was accomplished by using the Quartus II software. The design was verified both in functional and timing simulation in MAX 3000A devices (EPM312ATC100). Figures 3 and 4 show the timing simulation of the microcontroller I/O expansion during read and write operation. 6 Altera Corporation

Figure 3. Microcontroller I/O Expansion Write Mode Timing Simulation Configure the Microcontroller I/O Expander The HightoLow Transition of the WR Signal Creates New Output Values Change the Enabled Port The WR Signal Creates New Output Values With all the I/O pins in tristate mode, each port is initialized. After initialization, Port A and Port B are configured as output, Port C and Port D are configured as input, and Port B is enabled for write operation. When the WR signal asserts a hightolow transition, the MCU port data (146) is latched to the output Port B. In the last section of simulation, Port A is enabled at the hightolow transition of the LOAD signal. When the WR signal asserts a hightolow transition, the MCU port data (10) is latched to the output Port A. Altera Corporation 7

Figure 4. Microcontroller I/O Expansion Read Mode Timing Simulations The RD Signal Creates New Output Values Configure the Microcontroller I/O Expander The HightoLow Transition of the WR Signal Creates New Output Values Change the Enabled Port With all the I/O pins in tristate mode, each port is initialized. After initialization, all ports (A, B, C, and D) are configured as input and Port C is enabled for read operation. When the read signal asserts a hightolow transition, the Port C data is latched to the MCU port. While in the last part of the simulation, Port D is enabled at the hightolow transition of the LOAD signal. When the RD signal asserts a hightolow transition, the Port D data (146) is latched to the MCU port. Altera Corporation

Microcontroller I/O Expander Applications Figures 5 shows how to increase the microcontroller s I/O ports using the I/O expander. This microcontroller I/O expander can be targeted or modified to target to any bit microcontroller (e.g., PIC and 051). Figure 5. Application of Microcontroller I/O Expander Microcontroller I/O Expander RD output WR output RD WR Port A CS output LOAD output CS LOAD Port B CONF output MODE output CONF MODE Port C RST output Microcontroller I/O Port RST MCU Port Port D Conclusion With up to 20 I/O pins and MultiVolt I/O capability, Altera MAX 3000A devices allow you to implement microcontroller I/O expansion in a single device. MAX 3000A devices enable you to design custom microcontroller I/O expanders with additional features other than the example provided in this application note. Altera Corporation 9

101 Innovation Drive San Jose, CA 95134 (40) 5447000 www.altera.com Applications Hotline: (00) 00EPLD Literature Services: lit_req@altera.com Copyright 2003 Altera Corporation. All rights reserved. Altera, The Programmable Solutions Company, the stylized Altera logo, specific device designations, and all other words and logos that are identified as trademarks and/or service marks are, unless noted otherwise, the trademarks and service marks of Altera Corporation in the U.S. and other countries. All other product or service names are the property of their respective holders. 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. Printed on recycled paper 10 Altera Corporation