Section 10. Parallel Slave Port

Similar documents
Section 19. Voltage Reference

Section 14. Compare/Capture/PWM (CCP)

Section 9. I/O Ports

INTERRUPTS. There are 2 methods for communicating between the microcontroller and the external system: POLLING INTERRUPTS

Section bit A/D Converter

Section bit A/D Converter

Section 8. Interrupts

Using The PIC I/O Ports

CAN bus board. EB018

AVR151: Setup and Use of the SPI. Introduction. Features. Atmel AVR 8-bit Microcontroller APPLICATION NOTE

Serial Communications

Introduction the Serial Communications Huang Sections 9.2, 10.2 SCI Block User Guide SPI Block User Guide

8741A UNIVERSAL PERIPHERAL INTERFACE 8-BIT MICROCOMPUTER

Section 27. Device Configuration Bits

SPI. Overview and Use of the PICmicro Serial Peripheral Interface. Getting Started: SPI

Section 17. UART HIGHLIGHTS UART. This section of the manual contains the following major topics:

Using Altera MAX Series as Microcontroller I/O Expanders

Section 29. Real-Time Clock and Calendar (RTCC)

Real-Time Clock. * Real-Time Computing, edited by Duncan A. Mellichamp, Van Nostrand Reinhold

Microprocessor & Assembly Language

Hello, welcome to this presentation of the low power timer, or LPTMR, module for Kinetis MCUs. In this session you ll learn about the LPTMR, it s

AT15007: Differences between ATmega328/P and ATmega328PB. Introduction. Features. Atmel AVR 8-bit Microcontrollers APPLICATION NOTE

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

CSE2102 Digital Design II - Topics CSE Digital Design II

Tutorial for MPLAB Starter Kit for PIC18F

Fondamenti su strumenti di sviluppo per microcontrollori PIC

Section 15. Quadrature Encoder Interface (QEI)

M68EVB908QL4 Development Board for Motorola MC68HC908QL4

Chapter 13. PIC Family Microcontroller

MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

USER GUIDE EDBG. Description

CENTRONICS interface and Parallel Printer Port LPT

Chapter 11: Input/Output Organisation. Lesson 06: Programmed IO

AVR131: Using the AVR s High-speed PWM. Introduction. Features. AVR 8-bit Microcontrollers APPLICATION NOTE

Timer A (0 and 1) and PWM EE3376

Section 7. Oscillator

Section 24. Inter-Integrated Circuit (I 2 C )

I 2 C Master Mode Overview and Use of the PICmicro MSSP I 2 C Interface with a 24xx01x EEPROM

Section 15. Input Capture

Interrupts. 1.Maskable interrupt request can be ignored or delayed by the microprocessor and used in telephone

PART B QUESTIONS AND ANSWERS UNIT I

8254 PROGRAMMABLE INTERVAL TIMER

DKWF121 WF121-A B/G/N MODULE EVALUATION BOARD

Technical Note. Micron NAND Flash Controller via Xilinx Spartan -3 FPGA. Overview. TN-29-06: NAND Flash Controller on Spartan-3 Overview

Section 15. Motor Control PWM

VDIP1. Vinculum VNC1L Module. Datasheet

AVR Timer/Counter. Prof Prabhat Ranjan DA-IICT, Gandhinagar

Implementing SPI Master and Slave Functionality Using the Z8 Encore! F083A

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware

Section 28. In-Circuit Serial Programming (ICSP )

AN141 SMBUS COMMUNICATION FOR SMALL FORM FACTOR DEVICE FAMILIES. 1. Introduction. 2. Overview of the SMBus Specification. 2.1.

Scalable PLC AC500 Communication AC500 Modbus TCP. ABB Group Version 3.1 ( ) Technical Guides

Objectives. Basics of Serial Communication. Simplex vs Duplex. CMPE328 Microprocessors (Spring ) Serial Interfacing. By Dr.

Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide

a8251 Features General Description Programmable Communications Interface

APPLICATION NOTE. Atmel AVR134: Real Time Clock (RTC) Using the Asynchronous Timer. Atmel AVR 8-bit Microcontroller. Introduction.

Chapter 02: Computer Organization. Lesson 04: Functional units and components in a computer organization Part 3 Bus Structures

Application Note AN_209. AN_209 PDIUSBD12 to FT120 Migration Guide

How To Program A Microcontroller Board (Eb064) With A Psp Microcontroller (B064-74) With An Ios 2.5V (Power) And A Ppt (Power Control) (Power Supply) (

Chapter 2 Logic Gates and Introduction to Computer Architecture

8-bit Microcontroller. Application Note. AVR134: Real-Time Clock (RTC) using the Asynchronous Timer. Features. Theory of Operation.

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC Microprocessor & Microcontroller Year/Sem : II/IV

Backup Power Domain. AN Application Note. Introduction

TURBO PROGRAMMER USB, MMC, SIM DEVELOPMENT KIT

8259A PROGRAMMABLE INTERRUPT CONTROLLER (8259A 8259A-2)

ETEC Digital Controls PIC Lab 10 Pulse Width Modulation

Am186ER/Am188ER AMD Continues 16-bit Innovation

SIMPLE EPROM PROGRAMMER. EPROM Programmer Design. Hardware

Embedded Multi-Media Card Specification (e MMC 4.5)

Part Number Description Packages available

M25P05-A. 512-Kbit, serial flash memory, 50 MHz SPI bus interface. Features

Memory unit. 2 k words. n bits per word

Section 14. Motor Control PWM

8051 Serial Port. Crystal TXD. I/O Device RXD. Embedded Systems Peripherals

An Introduction to MPLAB Integrated Development Environment

AVR315: Using the TWI Module as I2C Master. Introduction. Features. AVR 8-bit Microcontrollers APPLICATION NOTE

Interfacing Analog to Digital Data Converters

Hello, and welcome to this presentation of the STM32L4 reset and clock controller.

AVR311: Using the TWI Module as I2C Slave. Introduction. Features. AVR 8-bit Microcontrollers APPLICATION NOTE

MicroMag3 3-Axis Magnetic Sensor Module

AXI Performance Monitor v5.0

ES_LPC4357/53/37/33. Errata sheet LPC4357/53/37/33. Document information

TERMINAL Debug Console Instrument

Switch Fabric Implementation Using Shared Memory

AND8336. Design Examples of On Board Dual Supply Voltage Logic Translators. Prepared by: Jim Lepkowski ON Semiconductor.

AN736. An I 2 C TM Network Protocol for Environmental Monitoring THE I 2 C BUS SPECIFICATION INTRODUCTION

RFID MODULE Mifare Reader / Writer SL030 User Manual Version 2.6 Nov 2012 StrongLink

Atmel Norway XMEGA Introduction

Display Board Pulse Width Modulation (PWM) Power/Speed Controller Module

Below is a diagram explaining the data packet and the timing related to the mouse clock while receiving a byte from the PS-2 mouse:

xlogic App from Easy Electronic-Overview

Flip-Flops and Sequential Circuit Design. ECE 152A Winter 2012

Flip-Flops and Sequential Circuit Design

ARM Thumb Microcontrollers. Application Note. Software ISO 7816 I/O Line Implementation. Features. Introduction

A DIY Hardware Packet Sniffer

AVR134: Real Time Clock (RTC) using the Asynchronous Timer. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

UMBC. ISA is the oldest of all these and today s computers still have a ISA bus interface. in form of an ISA slot (connection) on the main board.

UART IP Core Specification. Author: Jacob Gorban

RN-131-PICTAIL & RN-171-PICTAIL Evaluation Boards

Analog-to-Digital Converters

Transcription:

M Section 10. Parallel Slave Port HIGHLIGHTS This section of the manual contains the following major topics: 10.1 Introduction...10-2 10.2 Control Register...10-3 10.3 Operation...10-4 10.4 Operation in Sleep Mode...10-5 10.5 Effect of a Reset...10-5 10.6 PSP Waveforms...10-5 10.7 Design Tips...10-6 10.8 Related Application Notes...10-7 10.9 Revision History...10-8 10 Parallel Slave Port 1997 Microchip Technology Inc. DS31010A page 10-1

PICmicro MID-RANGE MCU FAMILY 10.1 Introduction Some devices have an 8-bit wide Parallel Slave Port (PSP). This port is multiplexed onto one of the devices I/O ports. The PORT operates as an 8-bit wide Parallel Slave Port, or microprocessor port, when the PSPMODE control bit is set. In this mode, the input buffers are TTL. In slave mode the module is asynchronously readable and writable by the external world through control input pin and the control input pin. It can directly interface to an 8-bit microprocessor data bus. The external microprocessor can read or write the PORT latch as an 8-bit latch. Setting the PSPMODE bit enables port pins to be the input, the input, and the (chip select) input. Note 1: At present the Parallel Slave Port (PSP) is only multiplexed onto PORTD and PORTE. The microprocessor port becomes enabled when the PSPMODE bit is set. In this mode, the user must make sure that PORTD and PORTE are configured as digital I/O. That is, peripheral modules multiplexed onto the PSP functions are disabled (such as the A/D). When PORTE is configured for digital I/O. PORTD will override the values in the TRISD register. Note 2: In this mode the PORTD and PORTE input buffers are TTL. The control bits for the PSP operation are located in TRISE. There are actually two 8-bit latches, one for data-out (from the PICmicro) and one for data input. The user writes 8-bit data to PORT data latch and reads data from the port pin latch (note that they have the same address). In this mode, the TRIS register is ignored, since the microprocessor is controlling the direction of data flow. Figure 10-1 shows the block diagram for the PSP. Figure 10-1: PORTD and PORTE Block Diagram (Parallel Slave Port) Data bus D Q Port CK EN PSP7:PSP0 Port One bit of PORTD Q D EN EN TTL Set interrupt flag PSPIF Read TTL Chip Select TTL Write TTL Note: I/O pins have protection diodes to VDD and VSS. DS31010A-page 10-2 1997 Microchip Technology Inc.

Section 10. Parallel Slave Port 10.2 Control Register Register 10-1: TRISE Register R-0 R-0 R/W-0 R/W-0 U-0 R/W-1 R/W-1 R/W-1 IBF OBF IBOV PSPMODE TRISE2 TRISE1 TRISE0 bit 7 bit 0 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 IBF: Input Buffer Full Status bit 1 = A word has been received and waiting to be read by the CPU 0 = No word has been received OBF: Output Buffer Full Status bit 1 = The output buffer still holds a previously written word 0 = The output buffer has been read IBOV: Input Buffer Overflow Detect bit (in microprocessor mode) 1 = A write occurred when a previously input word has not been read (must be cleared in software) 0 = No overflow occurred PSPMODE: Parallel Slave Port Mode Select bit 1 = Parallel slave port mode 0 = General purpose I/O mode Unimplemented: Read as '0' TRISE2: RE2 direction control bit 1 = Input 0 = Output TRISE1: RE1 direction control bit 1 = Input 0 = Output TRISE0: RE0 direction control bit 1 = Input 0 = Output Legend R = Readable bit W = Writable bit U = Unimplemented bit, read as 0 - n = Value at POR reset 10 Parallel Slave Port 1997 Microchip Technology Inc. DS31010A-page 10-3

PICmicro MID-RANGE MCU FAMILY 10.3 Operation A write to the PSP from the external system, occurs when both the and lines are first detected low. When either the or lines become high (edge triggered), the Input Buffer Full status flag bit IBF (TRISE<7>) is set on the Q4 clock cycle, following the next Q2 cycle, to signal the write is complete. The interrupt flag bit, PSPIF, is also set on the same Q4 clock cycle. The IBF flag bit is inhibited from being cleared for additional TCY cycles (see parameter 66). If the IBF flag bit is cleared by reading the PORTD input latch, and this has to be a read-only instruction (i.e., MOVF) and not a read-modify-write instruction. The input Buffer Overflow status flag bit IBOV (TRISE<5>) is set if a second write to the Parallel Slave Port is attempted when the previous byte has not been read out of the buffer. A read from the PSP from the external system, occurs when both the and lines are first detected low. The Output Buffer Full status flag bit OBF (TRISE<6>) is cleared immediately indicating that the PORTD latch was read by the external bus. When either the or pin becomes high (edge triggered), the interrupt flag bit PSPIF is set on the Q4 clock cycle, following the next Q2 cycle, indicating that the read is complete. OBF remains low until data is written to PORTD by the user firmware. Input Buffer Full Status Flag bit IBF, is set if a received word is waiting to be read by the CPU. Once the PORT input latch is read, the IBF bit is cleared. The IBF bit is a read only status bit. Output Buffer Full Status Flag bit OBF, is set if a word written to PORT latch is waiting to be read by the external bus. Once the PORTD output latch is read by the microprocessor, OBF is cleared. Input Buffer Overflow Status Flag bit IBOV is set if a second write to the microprocessor port is attempted when the previous word has not been read by the CPU (the first word is retained in the buffer). When not in Parallel Slave Port mode, the IBF and OBF bits are held clear. However, if flag bit IBOV was previously set, it must be cleared in the software. An interrupt is generated and latched into flag bit PSPIF when a read or a write operation is completed. Interrupt flag bit PSPIF must be cleared by user software and the interrupt can be disabled by clearing interrupt enable bit PSPIE. Table 10-1: PORTE Functions Name Function Read Control Input in parallel slave port mode: 1 = Not a read operation 0 = Read operation. Reads PORTD register (if chip selected) Write Control Input in parallel slave port mode: 1 = Not a write operation 0 = Write operation. Writes PORTD register (if chip selected) Chip Select Control Input in parallel slave port mode: 1 = Device is not selected 0 = Device is selected Note: The PSP may have other functions multiplexed onto the same pins. For the PSP to operate, the pins must be configured as digital I/O. DS31010A-page 10-4 1997 Microchip Technology Inc.

Section 10. Parallel Slave Port 10.4 Operation in Sleep Mode 10.5 Effect of a Reset 10.6 PSP Waveforms When in sleep mode the microprocessor may still read and write the Parallel Slave Port. These actions will set the PSPIF bit. If the PSP interrupts are enabled, this will wake the processor from sleep mode so that the PSP data latch may be either read, or written with the next value for the microprocessor. After any reset the PSP is disabled and PORTD and PORTE are forced to their default mode. Figure 10-2 shows the waveform for a write from the microprocessor to the PSP, while Figure 10-3 shows the waveform for a read of the PSP by the microprocessor. Figure 10-2: Parallel Slave Port Write Waveforms Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 PORTD<7:0> IBF OBF PSPIF Note: The IBF flag bit is inhibited from being cleared until after this point. Figure 10-3: Parallel Slave Port Read Waveforms Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 PORTD<7:0> IBF OBF PSPIF 10 Parallel Slave Port 1997 Microchip Technology Inc. DS31010A-page 10-5

PICmicro MID-RANGE MCU FAMILY 10.7 Design Tips Question 1: Migrating from the PIC16C74 to the PIC16C74A, the operation of the PSP seems to have changed. Answer 1: Yes, a design change was made so the PIC16C74A is edge sensitive (while the PIC16C74 was level sensitive). See Appendix C.9 for more information. DS31010A-page 10-6 1997 Microchip Technology Inc.

Section 10. Parallel Slave Port 10.8 Related Application Notes This section lists application notes that are related to this section of the manual. These application notes may not be written specifically for the Mid-Range MCU family (that is they may be written for the Base-Line, or High-End families), but the concepts are pertinent, and could be used (with modification and possible limitations). The current application notes related to the Parallel Slave Port are: Title Application Note # Using the 8-bit Parallel Slave Port AN579 10 Parallel Slave Port 1997 Microchip Technology Inc. DS31010A-page 10-7

PICmicro MID-RANGE MCU FAMILY 10.9 Revision History Revision A This is the initial released revision of the Parallel Slave Port description. DS31010A-page 10-8 1997 Microchip Technology Inc.