NS8050U MICROWIRE PLUSTM Interface

Similar documents
DP8212 DP8212M 8-Bit Input Output Port

DM Segment Decoder Driver Latch with Constant Current Source Outputs

LCD Direct Drive Using HPC

74F574 Octal D-Type Flip-Flop with 3-STATE Outputs

74LVQ374 Low Voltage Octal D-Type Flip-Flop with 3-STATE Outputs

LCD Triplex Drive with COP820CJ

Chapter 2. Digital Circuits

74F273 Octal D-Type Flip-Flop

Although the examples given in this application note are based on the ZX-24, the principles can be equally well applied to the other ZX processors.

Logic Devices for Interfacing, The 8085 MPU Lecture 4

with Internal Decoding and Quiet Series I O Buffers

2-Way Multiplexed LCD Drive and Low Cost A D Converter. Using V F Techniques with COP8 Microcontrollers AN-673

FLIP-FLOPS AND RELATED DEVICES

DM Segment Decoder/Driver/Latch with Constant Current Source Outputs

Comparing JTAG, SPI, and I2C

S6B CH SEGMENT DRIVER FOR DOT MATRIX LCD

64CH SEGMENT DRIVER FOR DOT MATRIX LCD

T e. e available in EIAJ e available in JEDEC and EIAJ e available in wide format e available in standard and. T w. e planned in standard

Engineering Bulletin. General Description. Provided Files. AN2297/D Rev. 0.1, 6/2002. Implementing an MGT5100 Ethernet Driver

Using the Synchronized Pulse-Width Modulation etpu Function by:

LMH0344 3Gbps HD/SD SDI Adaptive Cable Equalizer

Counter/timer 2 of the 83C552 microcontroller

SEQUENTIAL LOGIC. Satish Chandra Assistant Professor Department of Physics P P N College, Kanpur

BUSES IN COMPUTER ARCHITECTURE

IT T35 Digital system desigm y - ii /s - iii

MM5452/MM5453 Liquid Crystal Display Drivers

Memory elements. Topics. Memory element terminology. Variations in memory elements. Clock terminology. Memory element parameters. clock.

Logic Design. Flip Flops, Registers and Counters

Chapter 5 Flip-Flops and Related Devices

Introduction. NAND Gate Latch. Digital Logic Design 1 FLIP-FLOP. Digital Logic Design 1

SMPTE-259M/DVB-ASI Scrambler/Controller

HCS08 SG Family Background Debug Mode Entry

The University of Texas at Dallas Department of Computer Science CS 4141: Digital Systems Lab

A MISSILE INSTRUMENTATION ENCODER

Interfacing the TLC5510 Analog-to-Digital Converter to the

V6118 EM MICROELECTRONIC - MARIN SA. 2, 4 and 8 Mutiplex LCD Driver

CS8803: Advanced Digital Design for Embedded Hardware

FEATURES APPLICATIONS BLOCK DIAGRAM. PT6311 VFD Driver/Controller IC

DM74LS377 Octal D-Type Flip-Flop with Common Enable and Clock

Microcontrollers and Interfacing week 7 exercises

FEATURES DESCRIPTION APPLICATION BLOCK DIAGRAM. PT6311 VFD Driver/Controller IC

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) COUNTERS

This document describes a program for 7-segment LED display (dynamic lighting).

HT9B92 RAM Mapping 36 4 LCD Driver

Name Of The Experiment: Sequential circuit design Latch, Flip-flop and Registers

Design and Implementation of Timer, GPIO, and 7-segment Peripherals

Laboratory Exercise 4

SURFACE MOUNT LED LAMP 0603 (0.8 mm Height)

74F377 Octal D-Type Flip-Flop with Clock Enable

This document describes a program for 7-segment LED display (dynamic lighting) and key matrix and input.

Digital Systems Laboratory 3 Counters & Registers Time 4 hours

ST10F273M Errata sheet

Chapter 4. Logic Design

HT162X HT1620 HT1621 HT1622 HT16220 HT1623 HT1625 HT1626 COM

Introduction. Serial In - Serial Out Shift Registers (SISO)

Experiment 8 Introduction to Latches and Flip-Flops and registers

LMH0002 SMPTE 292M / 259M Serial Digital Cable Driver

Netzer AqBiSS Electric Encoders

ADC Peripheral in Microcontrollers. Petr Cesak, Jan Fischer, Jaroslav Roztocil

MC54/74F568 MC54/74F569 4-BIT BIDIRECTIONAL COUNTERS (WITH 3-STATE OUTPUTS) 4-BIT BIDIRECTIONAL COUNTERS (WITH 3-STATE OUTPUTS)

SUBSYSTEMS FOR DATA ACQUISITION #39. Analog-to-Digital Converter (ADC) Function Card

Using the HT1628 for Washing Machine Panel Display

CHAPTER1: Digital Logic Circuits

HCF4054B 4 SEGMENT LIQUID CRYSTAL DISPLAY DRIVER WITH STROBED LATCH FUNCTION

Flip-Flops. Because of this the state of the latch may keep changing in circuits with feedback as long as the clock pulse remains active.

Sequential Logic and Clocked Circuits

Sequential Logic Basics

IS01BFRGB LCD SmartDisplay from NKK Switches Simple implementation featuring the ATmega88PA from Atmel Complete software solution

Programmable Video Sync Generator

Laboratory 9 Digital Circuits: Flip Flops, One-Shot, Shift Register, Ripple Counter

Logic Design II (17.342) Spring Lecture Outline

64CH SEGMENT DRIVER FOR DOT MATRIX LCD INTRODUCTION FEATURES 100 QFP-1420C

CLC011 Serial Digital Video Decoder

L9822E OCTAL SERIAL SOLENOID DRIVER

Mask Set Errata for Mask 1M07J

STA2051E VESPUCCI 32-BIT SINGLE CHIP BASEBAND CONTROLLER FOR GPS AND TELEMATIC APPLICATIONS 1 FEATURES. Figure 1. Packages

MODULAR DIGITAL ELECTRONICS TRAINING SYSTEM

EMPTY and FULL Flag Behaviors of the Axcelerator FIFO Controller

MP-III Writer User Manual MANUAL REVISION HISTORY Version Date Description V1.0 Mar First Issue SONiX TECHNOLOGY CO., LTD. Page 2 Version 1.0

SURFACE MOUNT LED LAMP STANDARD BRIGHT 1210

82C55A CHMOS PROGRAMMABLE PERIPHERAL INTERFACE

Multi-channel LED driver with integrated boost controller for medium, large LCD panel backlight based on LED7708 and STM32F103C6T6A

C-MAX. CMM-9301-V3.1S Bluetooth 4.0 Single Mode HCI Module. Description. 1.1 Features

AN-822 APPLICATION NOTE

SURFACE MOUNT LED LAMP FULL COLOR 1210

Application Note AN39

AD9884A Evaluation Kit Documentation

Logic Analyzer Triggering Techniques to Capture Elusive Problems

TMS320C6000: Board Design for JTAG

Blackmon 45) Date of Patent: Nov. 2, 1993

VTU NOTES QUESTION PAPERS NEWS RESULTS FORUMS Registers

A 400MHz Direct Digital Synthesizer with the AD9912

NT7108. Neotec Semiconductor Ltd. 新德科技股份有限公司 NT7108 LCD Driver. Copyright: NEOTEC (C)

Registers. Unit 12 Registers and Counters. Registers (D Flip-Flop based) Register Transfers (example not out of text) Accumulator Registers

Hitachi Europe Ltd. ISSUE : app084/1.0 APPLICATION NOTE DATE : 28/04/99

4-BIT PARALLEL-TO-SERIAL CONVERTER

VFD Driver/Controller IC

Experiment 8 Fall 2012

Digital Circuits 4: Sequential Circuits

Contents Circuits... 1

Transcription:

NS8050U MICROWIRE PLUSTM Interface National Semiconductor Application Note 358 Rao Gobburu James Murashige April 1984 FIGURE 1 Microwire Mode Functional Configuration TRI-STATE is a registered trademark of National Semiconductor Corp COPSTM MICROWIRETM and MICROWIRE PLUSTM are trademarks of National Semiconductor Corp INTRODUCTION MICROWIRETM is a serial communications interface from National Semiconductor Originally devised to allow the COPSTM Microcontrollers to effectively communicate with peripheral devices it has now been extended to the 8-bit 8048 microcontroller family This extension is known as MICROWIRE PLUS The NS8050 from National Semiconductor slated shortly for release incorporates MICROWIRE PLUS Its existence is entirely transparent to normal 8050 operation and is only activated upon execution of a new MICROWIRE PLUS instruction This application note describes the features of the extension and presents programming examples to illustrate how to use MICROWIRE PLUS MICROWIRE PLUS The MICROWIRE PLUS protocol utilizes a 3-wire interface working in conjunction with a clocked eight bit input output shift register Figure 1 The shift register is referred to as the Serial Input Output (SIO) register The three interface signals are Serial Output (SO) Serial Input (SI) and Serial Clock (SK) The contents of the accumulator may be exchanged with the SIO register thus providing us a means of performing the parallel to serial data conversion Data waiting to be transmitted in the SIO register is clocked out on the SO pin on the falling SK clock edge Serial data is received on the SI pin and clocked into the SIO register on the rising SK clock edge On reset the NS8050 comes up in the normal mode of operation The MICROWIRE mode of operation may be invoked by executing one of two new instructions XCHM or XCHS Both instructions cause the Accumulator and SIO register to exchange data with the differences being in the SK clock generation In Master mode set by XCHM the SK clock is generated internally and output to other devices In Slave mode set by XCHS the SK clock is input into the chip from a master source Once the MICROWIRE mode has been selected it remains in effect until a system reset restores the normal mode of operation The only practical difference TL DD 6103 1 NS8050U MICROWIRE PLUS Interface AN-358 C1995 National Semiconductor Corporation TL DD 6103 RRD-B30M105 Printed in U S A

between the 2 operating modes are the dedication of 3 I O pins to MICROWIRE operation However once in MICRO- WIRE mode the chip may switch between Master and Slave operation at will TL DD 6103 2 The 2 new instructions and their associated operations are as follows Mnenomic Opcode Operation XCHM C0 A k e l SIO Reset DONE flip-flop Clock counter SK designated as an output MICROWIRE mode selected XCHS C1 A k e l SIO Reset DONE flip-flop Clock counter SK designated as an input MICROWIRE mode selected For MICROWIRE PLUS applications one NS8050 must be designated as the Master The Master supplies the SK clock for the system and initiates all data transfers between itself and one of the Slave devices A Slave may be any of the standard MICROWIRE peripheral chips or another MICRO- WIRE PLUS NS8050 operating in Slave mode In a typical system the Serial Clock (SK) is tied together on all the chips The Serial Out (SO) from the Master is tied to the Serial In (SI) on all the Slaves Similiarly the Serial in (SI) pin on the Master is tied to the Serial Out (SO) on all the Slaves General purpose outputs on the Master are used to chip select various Slave devices onto the MICROWIRE PLUS bus Among the various standard MICROWIRE peripherals available are display drivers (LCD VF LED) memories (RAM EEROM) A D converters and frequency generators timers NS8050 HARDWARE MODIFICATIONS Three of the general purpose I O pins on the NS8050 become dedicated signals when operating in MICROWIRE mode as follows Function Under NS8050 Pin MICROWIRE PLUS T0 Serial Clock Input or Output (SK) P26 Serial Data Output (SO) P27 Serial Data Input (SI) In addition upon entering MICROWIRE mode the port latches associated with P26 and P27 are disconnected from the port and used instead as configuration registers They are still loaded by using the NS8050 port instructions with the following MICROWIRE PLUS functions selectable P36 latch is used to Enable Disable the TRI-STATE SO output 1 e Disabled 0 e Enabled P27 latch is used to select the SK output frequency 1 e Instruction cycle clock divided by 4 (crystal freq 60) 0 e Instruction cycle clock divided by 1 (crystal freq 15) As in other chips in the 8048 family RESET causes the latches associated with Ports 1 and 2 to set to a 1 Consequently if the P26 and P27 latches are not otherwise initialized upon entering MICROWIRE mode the SO output will be disabled and divide by 4 selected for SK generation However P26 and P27 may be modified at any time even when in MICROWIRE mode When in MICROWIRE mode port pins P26 and P27 may still be read in using the IN A P2 instruction and will reflect the state of the SO and SI pins respectively Note however that these pins also have internal pullup devices connected to them as shown To facilitate data transfers a DONE flip-flop has been included in the MICROWIRE circuitry It and the clock counter are Reset upon every exchange between the Accumulator and the SIO register When the clock counter reaches a count of 8 indicating that the SIO has completely shifted out DONE is set The DONE F F is connected internally to the T0 sense line upon entering the MICROWIRE mode thus allowing it to be tested by the JT0 and JNT0 instructions Because of this any of the other T0 functions such as clock generation are precluded from operation while in MICRO- WIRE mode It should be noted that the SK clock may only be shut down by the DONE F F which in turn is driven by the Clock Counter The Clock Counter may only be preset by 0 by an XCHM or XCHS instruction after which it will immediately start counting clock pulses APPLICATION NOTES MICROWIRE PLUS may be effectively used for Local Area Networks (LANs) and Small Area Networks (SANs) Possible applications range from setting up a communications network within an automobile to home security systems With the ability to switch between a MICROWIRE Master and Slave device at will a multi-master NS8050 bus network may be implemented In NS8050 only systems MICROWIRE data may be transferred at the instruction cycle time of 1 36 ms (733 khz) When using standard MICROWIRE peripherals data transfers must generally be restricted to 4 ms (250 khz) as shown in Figure 2a Also shown are typical MICROWIRE setup and hold times on the data lines relative to the SK clock Figure 2b illustrates SIO bit shifting relative to instruction execution When counting out instructions the XCH should be placed so that the last bit will be shifted in and out while the instruction is being read in as shown in Figure 2b For both divide by 1 and divide by 4 clock generation modes the rising SK clock edge is approximately coincident with the rising ALE edge as shown in Figure 3 For divide by 1 SK clock generation the duty cycle is 40% while for divide by 4 it is 50% (the ALE duty cycle is approximately 23%) Since the same drive circuits are used for both normal and MICROWIRE modes of operation the DC electrical characteristics are the same for the 3 I O pins in either mode ON THE MICROWIRE 8050 THE CRYSTAL OSCILLATOR PINS ARE REVERSED FROM ORDINARY 8050s To facilitate 8050 MICROWIRE usage with standard COPS peripherals a macro based I O Driver Software Package is available Written in 8048 assembly it may be used directly or studied as an example of 8050 MICROWIRE peripheral interfacing 2

TL DD 6103 3 Parameter Typical Units t SETUP 200 ns t HOLD 200 ns t VALID 50 ns t C 4 ns FIGURE 2a Microwire Interface Timing FIGURE 2b 8050 Microwire Serial Sequence TL DD 6103 4 3

FIGURE 3 NS8050 MIcrowire Clock Generation TL DD 6103 5 4

MASTER-SLAVE PROTOCOL EXAMPLE A number of handshake protocols are possible between a Master and Slave NS8050 in a MICROWIRE PLUS system The following example illustrates one possible method and discusses the timing holds and restrictions on each device The hardware configuration for our example is shown in Figure 4 and described as follows Slave SO connected to Master SI Slave SI connected to Master SO Slave SK connected to Master SK Master pin P24 used to chip select slave connected to Slave interrupt input Slave pin 25 connected to Master pin P25 used by slave as a BUSY output indicator Master and Slave have the same crystal frequencies to simplify things Before starting our example we will also assume the following initial conditions Master DONE flip-flop set causing SK clock generation to be shut down Master Clock divide by 4 selected (P27 latch set) SO enabled (P26 latch reset) Master P24 (Slave chip select) is high (inactive) Slave BUSY output (P25) is high (active) Slave DONE flip-flop is indeterminate TL DD 6103 6 FIGURE 4 Example Master-Slave Hardware Configuration In our example of Figure 5 the Master is performing a 2-byte write and read from the Slave The following is a step by step description of the key steps in code execution 1 Master wishes to send and or receive data from Slave He starts by activating the Slave chip select 2 Slave chip select causes an interrupt service call where Slave loads his first data byte into the SIO enables SO and resets BUSY The SIO load also clears out the clock counter and DONE flip-flop 3 All this time the Master was checking and waiting for BUSY to go away thus signifying that the Slave has rec- TL DD 6103 7 FIGURE 5 Master-Slave Handshake Execution organized the chip select interrupt The chip select is turned off and the Master loads his first data byte into the SIO thus commencing transmission 4 Both Master and Slave now wait for 8 data bits to be transmitted as indicated by the DONE flip-flop 5 Upon seeing that DONE is set the Slave immediately turns BUSY back on The Slave then saves the just received data byte disables SO and returns from interrupt service 6 After seeing that DONE is set Master delays enough to ensure that the Slave has turned BUSY back on Master delay might also want to be put in to allow the Slave time to return from subroutine and utilize the just received data byte or update pointers in preparation for the next interrupt service Alternatively the Slave could disable interrupts until housekeeping had been performed 7 The Master wants to send another data byte so he activates the Slave chip select once again The sequence for the Slave is the same as before In the Master the XCHM to load the second Master data byte into the SIO also brings in the first Slave data byte It is stored and after the current transmission is through the second Slave data byte may be brought in The first Slave data byte could have been brought in after the first Master WAIT sequence with an XCHM but that would have initiated another 8 SK Clock sequence which we would have had to wait out since SK must be shut down before initiating another transfer 8 Rather than use straight line code memory pointers and loop counters could easily be incorporated if the handshake restrictions described above are accounted for 5

AN-358 NS8050U MICROWIRE PLUS Interface LIFE SUPPORT POLICY NATIONAL S PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE SUPPORT DEVICES OR SYSTEMS WITHOUT THE EXPRESS WRITTEN APPROVAL OF THE PRESIDENT OF NATIONAL SEMICONDUCTOR CORPORATION As used herein 1 Life support devices or systems are devices or 2 A critical component is any component of a life systems which (a) are intended for surgical implant support device or system whose failure to perform can into the body or (b) support or sustain life and whose be reasonably expected to cause the failure of the life failure to perform when properly used in accordance support device or system or to affect its safety or with instructions for use provided in the labeling can effectiveness be reasonably expected to result in a significant injury to the user National Semiconductor National Semiconductor National Semiconductor National Semiconductor Corporation Europe Hong Kong Ltd Japan Ltd 1111 West Bardin Road Fax (a49) 0-180-530 85 86 13th Floor Straight Block Tel 81-043-299-2309 Arlington TX 76017 Email cnjwge tevm2 nsc com Ocean Centre 5 Canton Rd Fax 81-043-299-2408 Tel 1(800) 272-9959 Deutsch Tel (a49) 0-180-530 85 85 Tsimshatsui Kowloon Fax 1(800) 737-7018 English Tel (a49) 0-180-532 78 32 Hong Kong Fran ais Tel (a49) 0-180-532 93 58 Tel (852) 2737-1600 Italiano Tel (a49) 0-180-534 16 80 Fax (852) 2736-9960 National does not assume any responsibility for use of any circuitry described no circuit patent licenses are implied and National reserves the right at any time without notice to change said circuitry and specifications