GB2029172A - NRZ/biphase microcomputer serial communication logic - Google Patents

NRZ/biphase microcomputer serial communication logic Download PDF

Info

Publication number
GB2029172A
GB2029172A GB7926734A GB7926734A GB2029172A GB 2029172 A GB2029172 A GB 2029172A GB 7926734 A GB7926734 A GB 7926734A GB 7926734 A GB7926734 A GB 7926734A GB 2029172 A GB2029172 A GB 2029172A
Authority
GB
United Kingdom
Prior art keywords
serial
bit
data
microcomputer
register
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
GB7926734A
Other versions
GB2029172B (en
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Motorola Solutions Inc
Original Assignee
Motorola Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from US05/939,743 external-priority patent/US4346452A/en
Priority claimed from US05/939,742 external-priority patent/US4361876A/en
Priority claimed from US05/939,744 external-priority patent/US4222116A/en
Application filed by Motorola Inc filed Critical Motorola Inc
Publication of GB2029172A publication Critical patent/GB2029172A/en
Application granted granted Critical
Publication of GB2029172B publication Critical patent/GB2029172B/en
Expired legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • G06F13/385Information transfer, e.g. on bus using universal interface adapter for adaptation of a particular data processing system to different peripheral devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L25/00Baseband systems
    • H04L25/38Synchronous or start-stop systems, e.g. for Baudot code
    • H04L25/40Transmitting circuits; Receiving circuits
    • H04L25/49Transmitting circuits; Receiving circuits using code conversion at the transmitter; using predistortion; using insertion of idle bits for obtaining a desired frequency spectrum; using three or more amplitude levels ; Baseband coding techniques specific to data transmission systems
    • H04L25/4904Transmitting circuits; Receiving circuits using code conversion at the transmitter; using predistortion; using insertion of idle bits for obtaining a desired frequency spectrum; using three or more amplitude levels ; Baseband coding techniques specific to data transmission systems using self-synchronising codes, e.g. split-phase codes

Abstract

A single-chip microcomputer comprises a CPU (1), a RAM (2), a ROM (3), a timer (4), serial I/O communication logic (5), and four I/O ports (11-14). The serial I/O communication logic is capable of handling serial communications in either the NRZ or Manchester (bi- phase) format. The serial I/O communication logic also includes a control and status register (46, Fig. 4) one bit (WU) of which may be utilized, when the microcomputer is connected in a distributed processing system having a shared serial communication line, to indicate that the CPU wishes to ignore a message not of interest to it. When the serial communication line again becomes free, the WU control bit is reset, enabling the CPU to intercept a new message of interest. The serial I/O communication logic further includes a shift register (RBA-RBH, Fig. 8J) to separate the data and clock signals in a biphase-encoded data stream. The biphase encoding is adaptable to any data rate simply by changing the frequency of a high speed clock associated with the shift register. <IMAGE>

Description

SPECIFICATION NRZ/biphase microcomputer serial communication logic This invention relates generally to the field of data processing and, more particularly, to the serial 1/0 communication logic of a single-chip microcomputer.
Microcomputers are sophisticated, general purpose logic devices which can be programmed to perform a wide variety of useful control functions in industrial and communications equipment, large-scale and medium-scale computer peripheral and terminal hardware, automobiles and other transportation media, amusement and educational devices, and the like.
Microcomputers are being used increasingly to control serial data communications between data processing terminals, modems, and processors. Serial data communications between terminals or modems primarily utilizes NRZ (non-return-to-zero) encoding, whereas serial communications between processors primarily utilizes biphase encoding. Particularly, as distributed processing systems become increasingly important, such as in the automative environment, it also becomes increasingly important to provide a microcomputer with the capability of handling the highly reliable biphase format, which can tolerate a much greater mismatch between transmitter and receiver clocks.
As the unit cost of microcomputers decreases, these devices are becoming more and more attractive for controlling serial data communications of all types. It would be highly desirable to provide a microcomputer with the capability of utilizing both NRZ and biphase protocols.
However, in designing a microcomputer which can be sold at a competitive price it is mandatory that the on-chip logic be minimized to the greatest extent possible, since yields are inversely proportional to the chip size. There is a need therefore for a microcomputer serial I/O communication logic which can accommodate both NRZ and biphase encoding, yet which requires a minimum of logic to be implemented.
In a single-chip microcomputer having serial i/O communication logic it is desirable to minimize the number of unnecessary interruptions of the on-board microprocessor or CPU. By reducing unnecessary interrupts of the CPU, the efficiency of the microcomputer and the throughput of the CPU are increased. It is becoming increasingly common to connect several microcomputers together in what is known as a distributed processor or multi-processor configuration, wherein the microcomputers may share a common serial I/O communication line.
When serial communications are being conducted between a master CPU and a slave CPU, certain digital information transmitted over the shared serial I/O line may not be of interest to all of the CPUs. It is desirable to provide a means for a CPU to selectively ignore the contents of a message which is not specifically addressed to it and to "wake-up" when the serial I/O line again becomes free, in order that it may receive any future digital communications of interest to it.
In a microcomputer having on-board serial 1/0 data communication logic, and in fact in any serial data recovery logic such as is commonly used with controllers associated with various magnetic media devices, it is also desirable to have the capability of decoding Manchesterencoded data accurately and at any one of several data rates. The known prior art serial data recovery logic utilizes single-shot multivibrators to determine the "windows" for the transition intervals in Manchester (also known as FM or biphase) data streams. The single-shot multivibrators are subject to manufacturers' tolerances, drift, and other problems. More importantly, they restrict decoding to a single frequency.In order to avoid the tolerance problems associated with single-shot multivibrators, and to provide automatic accommodation of variable data rates, a totally digital system of serial data recovery is needed.
It is an object of the present invention to provide improved serial I/O communication logic in a a single-chip microcomputer.
It is another object of the present invention to provide in a single-chip microcomputer serial I/O communication logic capable of handling both NRZ and biphase formats.
According to the present invention there is provided a microcomputer having serial I/O communication logic, the communication logic including means for transmitting and receiving serial information over a serial I/O line in NRZ-encoded format, and means for transmitting and receiving serial information in biphase-encoded format. The microcomputer I/O communication logic also includes bistable storage means and means for setting the bistable storage means to a predetermined state if the microcomputer desires not to receive serial information on the serial I/O line.The microcomputer I/O communications logic also includes a digital circuit for separating data and clock signals in a biphase-encoded data stream having a clock frequency f, such digital circuit comprising means for providing an additional clock having a frequency Nf, where N is a positive integer greater than 2, a shift register having an input responsive to such data stream, and digital logic means responsive to the shift register for separating the data and clock signals.
The invention will now be described by way of example only with particular reference to the accompanying drawings in which: Figure 1 shows a block diagram of a single-chip microcomputer which embodies the present invention; Figure 2 illustrates the pin-out arrangement of the single-chip microcomputer which embodies the present invention; Figure 3shows a general block diagram of the serial I/O communication logic embodying the present invention; Figure 4shows a detailed block diagram of the serial I/O communication logic of the present invention; Figure 5 illustrates the software-addressable registers of the serial I/O communication logic; Figure 6 illustrates a multi-processor configuration illustrating one embodiment of the present invention; Figure 7A illustrates NRZ-encoded data; Figure 7B illustrates biphase-encoded data;; Figures 8A-8Jconstitute a detailed logic diagram for the serial I/O communication logic of the present invention; Figure 9 shows the interconnection of the individual drawings of Figs. 8A-8J; Figure 10 shows an additional detailed logic diagram for generating signals utilized within the logic circuitry illustrated in Figs. 8A-8J; Figure 11 is a schematic representation of the generation of the 91 and f2 internal microcomputer clocks from the master E clock input; Figure 12 is a block diagram illustrating the clocking arrangement in a preferred embodiment of the present invention; Figure 13 illustrates the relationship between the internal clocks f1 and 02 and the master clock E; Figure 14 represents a flowchart of the reset operation of the serial I/O communication logic;; Figure 15 represents a flowchart of the serial I/O communication logic operating in the halfduplex transmission mode; Figure 16 represents a flowchart of the serial I/O communication logic operating in the halfduplex reception mode and Figure 17-22 represent detailed circuit schematics of the flip-flops and latches utilized in the logic circuitry of Figs. 8A-8J.
With reference to Fig. 1, a block diagram of a single-chip microcomputer embodying the present invention is shown. It will be understood that the present invention may be implemented on other than a single-chip microcomputer. A preferred embodiment of the present invention is embodied in the microcomputer shown in Fig. 1, the Motorola MC6801 microcomputer.
The microcomputer shown in Fig. 1 comprises a central processor (CPU) 1, a random access memory (RAM) 2, a read-only-memory (ROM) 3, a timer circuit 4, and a serial I/O portion 5 as major functional blocks. The microcomputer shown in Fig. 1 also comprises a multiplexer (MUX) 6, an internal address bus 7, an internal data bus 8, and four I/O ports 11-14. CPU 1 receives as inputs thereto a master clock E over line 20, mode control signals CC1 and CC2 over lines 21 and 22, respectively a RESET signal over line 23, an interrupt request signal (X) over line 24, a non-maskable interrupt signal (NMI) over line 25, a power supply signal (Vcc) over line 26, and a ground signal (Vss) over line 27. The RAM 2 receives a Vcc standby supply over line 28 to preserve data in the RAM in the vent of a power failure.
Ports 1, 3, and 4 and 8-bit ports, and port 2 is a 5-bit port. The eight lines, P10-P17, into port 1 are dedicated solely to parallel I/O operations. The lines into ports 2-4 may be configured in different ways depending upon one of three possible modes of operating the microcomputer shown in Fig. 1. Port 2 has five lines P20-P24. Port 3 has eight lines P30-P37 and two control lines, SC1 and SC2. Control lines SC1 and SC2 into port 3 serve as input and output strobes. Port 4 has eight lines P40-P47. In the single chip mode all I/O lines of ports 2-4 can be programmed to serve either as inputs or outputs, in accordance with à data direction register associated with each port.In the expanded non-multiplex mode lines P30-P37 of port 3 function as the external data bus (DO-D7). In the expanded non-multiplex mode, lines P40-P47 of port 4 serve as the low-order address lines (AO-A7). If any of the eight address lines are not needed in this mode the remaining lines may be configured as I/O. In the expanded multiplex mode lines P30-P37 of port 3 serve both as the external data bus (DO-D7) and as the low-order address bus (AO-A7). In this mode, lines P40-P47 of port 4 serve as the high-order address lines (A8-A15). If any of the eight high-order address lines are not needed in this mode the remaining lines may be configured as I/O.
In all three modes lines P20-P24 of port 2 can be configured either as input or output lines by a data direction register associated with this port. Port 2 also provides accesss to the serial I/O communications capability and the programmable timer capability of the microcomputer shown in Fig. 1, in the manner to be discussed hereinafter.
The foregoing description of the microcomputer of Fig. 1, including the various operational modes, has been given as general back ground only, and the operation of the serial I/O features of the present invention may be completely understood independently of such description. The serial I/O operations of the present invention are conducted through pins P22, P23, and P24 only, and the function of these pins is unaffected by the particular mode of microcomputer operation as described above.
Fig. 2 provides a schematic representation 15 of the pin-out arrangement of the microcomputer of Fig. 1.
The serial l/O portion of the microcomputer of Fig. 1 is capable of conducting serial communications in full duplex or half-duplex at a variety of clock rates. In addition, the serial I/O logic is capable of handling serial operations in either of two formats: (1) standard mark/space (NRZ) which is typically used between terminals or modems, and (2) self-clocking biphase which is primarily used for communications between processors. The NRZ format is illustrated in Fig. 7A, and the biphase format is illustrated in Fig. 7B. Both formats begin with a START bit (always 0) and end with a STOP bit (always 1). The NRZ format provides a signal level corresponding to the bit value at each bit time. The level is then sampled at the middle of the bit time on decoding.The example shown in Fig. 7A represents the NRZ-encoded binary number 01001101. It will be noted that the number is encoded beginning with the least significant bit (LSB). At bit time zero the signal level is high, representing a binary "1". At bit time "1", the signal level is low, representing a binary "0", and so forth until the STOP bit signal indicates the conclusion of one byte. The NRZ format can tolerate only approximately a 3.75% mismatch between the transmitter and receiver clocks for correct operation.
Fig. 7B illustrates the encoding of the binary number 01001101 in the biphase format. The biphase format provides a transistion in signal level at every bit time and a transition at the centre of every bit with the value 1. The biphase format, also known as biphase-M, FM, F/2F, and Manchester format, can tolerate a difference of approximately 25% between the transmitter and receiver clocks for correct operation. It should be noted that an idle line in NRZ format is represented by a constant mark (1) on the line. In biphase format, an idle line will be toggling at every half-bit time.
It is particularly advantageous to provide the capability of transmitting and receiving communications in biphase format on a microcomputer. Since the biphase format can tolerate a much greater clocking mismatch in processor-to-processor communications, it is particularly useful in multi-processor arrangements, such as occur, for example, in automotive environments.
With reference to Fig. 3, a general block diagram of the serial I/O communication logic embodying the present invention is shown. The serial I/O circuitry comprises a transmitter portion including Transmit Data Register (TDR) 37, Transmit Shift Register (TDS) 38, a flip-flop TDST 39, TB Register 40, and TC Counter And Control Logic 41. The serial I/O logic also includes a receiver section including flip-flop RSD 33, Receive Shift Register (RDS) 34, flip-flop RDST 35, RB Register 31, RC Counter And Control Logic 32, and Receive Data Register (RDR) 36. Both the transmitter and receiver sections communicate with the microcomputer via the Peripheral Data Bus 30 and with external devices via pins P22, P23, and P24 of port 2.
In data transmission, an 8-bit data word to be transmitted is written to the Transmitter Data Register TDR 37 from Peripheral Data Bus 30. The eight bits are then transferred in parallel from TDR 37 to the Transmit Shift Register TDS 38, which shifts the bits out to Pin 4 of Port 2 via flip-flop TDST 39. TDST 39 formats the data stream and adds the start and stop bits to each transmitted word.
In data reception, an in-coming data stream is input through Pin 3 of Port 2 and passes through flip-flop RDS 33 to the Receive Shift Register 34 where it is shifted until the start bit is in flip-flop RDST 35, the eight data bits are in the Receive Shift Register 34, and the stop bit is in flip-flop RSD 33. If no framing error or overrun condition exists, the eight data bits are transferred in parallel from the Receive Shift Register 34 to the Receive Data Register RDR 36.
The word is then made available to the microcomputer by writing RDR 36 to Peripheral Data Bus 30.
The serial I/O logic of the present invention is programmable with respect to several important features. The data communications format may be programmed to utilize either NRZ or biphase encoding. The clock may be programmed to utilize either internal or external clock signals. The baud rate is programmable to one of four per given internal or external clock frequency. The wake-up capability may be enabled or disabled. Interrupt request may either be enabled or masked individually regarding the Transmit Data Register 37 and Receive Data Register 36. The clock output to pin 2 of port 2 may either be enabled or disabled. Finally, pins 3 and 4 of port 2 may either be dedicated or not dedicated to serial l/O operations individually with the transmitter and receiver portions.
Table I gives the four possible data communication rates for each of the microprocessor (p2 clock frequencies or the external clock frequencies. The various data rates and clock frequencies will be discussed in further detail within the Detailed Description.
The data link used with the serial I/O logic of the present invention may be either half-duplex or full duplex and may either use a separate clock or not. Both biphase and NRZ formats may be used without a separate clock line, but only the NRZ format may be used with a separate clock line (either input or output). Also it is possible to transmit only a clock to a remote dsvice. The various data link configurations are summarized in Table II.
The present invention provides a wake-up capability in multi-processor configurations utilizing the microcomputer shown in Fig. 1. The wake-up capability is intended to increase processor throughput by permitting non-interested processors on a common line to ignore the remainder of a message if the destination address is different from that of the particular processor. If the processor determines that the remainder of the message is not intended for it, it sets a wake-up bit (WU) in the Control and Status Register. With the wake-up bit set, the receiver portion continues to monitor messages without being interrupted. When eleven consecutive "1 '5" are received by the receiver portion, the receiver portion clears the wake-up bit WU to "wake-up" the interrupt processing for the next message.The eleven consecutive "1 '5" indicate the idle state on the transmission line. The wake-up capability will be described in greater detail below.
With reference now to Fig. 4, a detailed block diagram of the serial I/O logic of the present invention is shown. Data may be taken off Peripheral Data Bus 30 via an 8-bit bus 47 to Transmit Data Register 37, from which it is entered into Transmit Shift Register 38. From Transmit Shift Register 38 the data is shifted out serially through a gate 42 enabled by the Transmit Enable (TE) pulse. Pin 4 of port 2 is the serial transmit line.
Serial data is received over pin 3 of port 2 through gate 43 enabled by Receiver Enable (RE) signal. The serial input data is shifted into Receive Shift Register 34, and is then transferred in parallel into Receive Data Register 36. The contents of Receive Data Register 36 is sent over 8 bit bus 44 to the Peripheral Data Bus 30, from which it may be utilized by other portions of the microcomputer.
The serial I/O logic of the present invention utilizes four software-addressable registers, which are shown in Fig. 5 in the form of Control And Status Register 46, Rate And Mode Control Register 45, Receive Data Register 36, and Transmit Data Register 37.
Control and Status Register 46 consists of an 8-bit register of which all 8 bits may be read while only bits 0.4 may be written. The register is initialized to S20
on RESET. The bits in the register are defined as follows: 7 6 5 4 3 2 1 0 I RDRF ORFE TDRE RIE RE TIE TE WU ADDR: S0011 Bit OWU "Wake-up" on next message. When set, this bit enables the wake-up function; it is cleared by hardware on receipt of eleven consecutive 1 's. WU will not set if the line is idle.
Bit 1 TE Transmit Enable. When set, this bit produces a preamble of nine consecutive 1's and enables gating of the transmitter output to port 2, pin 4; it changes the DDR value for port 2, pin 4 to a "1".
Bit 2TIE Transmit Interrupt Enable. When set, it permits an iM2 interrupt to occur if TDRE is set. When clear, the TDRE value is masked from the bus.
Bit 3 RE Receiver Enable. When set, it gates port 2, pin 3 to the input of the receiver. It changes the DDR value for port 2, pin 3 to a zero.
Bit 4 RIE Receiver Interrupt Enable. When set, it permits an 11E2 interrupt to occur when either RDRF or ORFE is set. When clear, the interrupt is masked.
Bit 5TDRE Transmit Data Register Empty. It is set by hardware when a transfer is made from the Transmit Data Register to the Transmit Shift Register. This transfer is synchronized with the bit rate clock. The TDRE bit is cleared by reading the Status Register, then writing a new byte into the Transmit Data Register. No data will be transmitted if TDRE is not cleared. TDRE is initialized to 1 by RESET.
Bit 6 ORFE Over-Run-Framing Error. It is set by hardware when an overrun or framing error occurs (receiver only). An overrun is defined as a new byte transferred to the Receive Data Register with the RDRF flag set. A framing error has occurred when the byte boundaries in the bit stream are not synchronized to the bit counter. An overrun may be distinguished from a framing error by the corresponding value of RDRF. If RDRF = ORFE = 1, then an overrun has occurred. If RDRF = 0 and ORFE = 1, a framing error has been detected. The ORFE bit is cleared by first reading the Status Register, then reading the Receive Data Register, or by a EFT signal.
Bit 7 RDRF Receiver Data Register Full. It is set by hardware when a transfer from the Receive Shift Register to the Receive Data Register is made. The RDRF bit is cleared by first reading the Status Register, then reading the Receive Data Register, or by a RESET signal.
Rate and Mode Control Register 45, controls the following serial l/O variables: baud rate, format, clocking source, and Port 2 Pin 2 configuration. ~~~~~~ The register consists of four bits all of which are write-only and are cleared on RESET. The four bits in the register may be considered as a pair of 2-bit fields. The two low-order bits control the bit rate for internal clocking, and the remaining two bits control the format and clock select logic. The register definition is as follows: 7 6 5 4 3 2 1 0 X X X X CC1 CCO S1 SO ADDR: S0010 Bit Ol Bit 1IS1, SO Speed Select. These bits select the baud rate for the internal clock. The four rates which may be selected are a function of the CPU f2 clock frequency. The following table lists the available baud rates.If external clocking is selected (CC1 = CCf = 1), the speed select bits are ignored.
TABLE 1 S1, SO XTAL 4.0 MHZ 4.9152 MHZ 2.5476 MHZ f2 . + 1.0 1.2288 0.6144 00 16 62.5 KBaud 76.8 KBaud 38.4 KBaud 01 128 7,812.5 Baud 9,600 Baud 4,800 Baud 10 1024 976.6 Baud 1,200 Baud 600 Baud 11 4096 244.1 Baud 300 Baud 150 Baud Bit 2l Bit 3fCC1, CCO Clock Control and Format Select. This 2-bit field controls the clock and format select logic. The following table defines the bit field. If CC1 = 0, the DDR value for port 2 pin 2 is not affected. If CC1 = 1, the DDR value for port 2 pin 2 is changed to the complement of CC+.
CC1, FORMAT CLOCK PORT 2 CCO SOURCE BIT 2 BIT 3 ** BIT 4 ** 00 BI-PHASE INTERNAL NOT USED SERIAL INPUT SERIAL OUTPUT 01 NRZ INTERNAL NOT USED SERIAL INPUT SERIAL OUTPUT 10 NRZ INTERNAL OUTPUTt SERIAL INPUT SERIAL OUTPUT 11 NRZ EXTERNAL INPUT SERIAL INPUT SERIAL OUTPUT * Clock output is available regardless of values for bits RE and TE.
** Bit 3 is used for serial input if RE = "1" in Control and Status Register 46. Bit 4 is used for serial output if TE = "1" in Control and Status Register 46.
RB Register 31 is an 8-bit delay line which is used to extract the imbedded clock from the input data stream and to establish receiver synchronization. Reference to the appropriate Boolean equations below and the detailed logic diagram of Figs. 8A-8J shows that in the NRZ format the zero start bit is clocked into RB Register 31 and that thereafter the input toggles at the bit rate so long as RE remains set. Approximately two RT clock cycles are required (setting RE turns on the RB input) before RB Register 31 can respond to a "zero" start bit. As the "zero" propagates along, RB synchronization is established when RSE sets at the end of the third RT clock. The first RSD clock (RBD~RBE) is also generated at the end of the third RT clock and the first RO clock is generated at the end of the fifth RT clock.The RSD, and RO clocks continue to be generated at 3/8 bit time and 5/8 bit time so long as RB register 31 operates.
The bit counter RC goes to "one" at the end of RO and increments on each succeeding RO.
The start bit is clocked into RSD by RBD + RBE. There is normal loss of synchronization after data transfer, with synchronization regained during the following start bit.
The effect of resetting RE is that RB stops toggling; there is a loss of synchronization, RO, and RBD + RBE signals; the bit counter RC resets; and RSD, the RDS shift register 34, and RDST all stop. In the biphase format the entire data stream is clocked into the register.
After the microcomputer of Fig. 1 comes out of reset and before RE is set the RB Register begins filling up with "one", and hence no bit-rate clocks are generated, and the receiver is not functioning. There are three things necessary to establish reception: (a) RE must be set in order for the serial input data to be input to the RB Register, (b) the serial input data must be the idle line condition, namely all "ones", in order for the RB Register to begin generating the bit rate clocks, and (c) the first start bit in the serial input data stream cannot occur until the line has been idle for at least 1 bit time (otherwise synchronization cannot be established.) Therefore, the minimum time the line must remain idle after RE is set is one bit time.
Following the setting of RE, synchronization is established when RSE is set, which occurs when the first "zero" propagates along the RB Register, the first RO is generated by the leading edge of RSH at 1/4 bit time, and RSE is set by the leading edge of RLG at 3/4 bit time. The separation flip-flop RSD is driven by RSH and RLG and generates a signal SEP which is zero for "zero" input data and 5 volts for 1/2 bit time if data input is "one". The timing of SEP is such that as it is clocked into the Receive Shift Register 34 by RO it is finally totally converted to the NRZ format.
Setting RSE starts the bit counter RC. Since RSE sets 1/2 bit time later and RO occurs 1/8 bit time later for biphase than for NRZ, the location of each bit counter state for the biphase format lags the corresponding bit counter state for the NRZ format by 1-1/8 bit times. Thus the data transfer from the Receive Shift Register RDS 34 to the Receive Data Register RDR 36 which occurs at the end of the RC 9-count in both formats, occurs 1-1/8 bit times later in biphase than in NRZ, i.e. near the end of the stop bit for NRZ and near the end of the following start bit for biphase The effect of resetting RE is to cause RB Register 31 to stop toggling (causing loss of synchronization and bit clock Rub), the resetting of bit counter RC, and stopping of RDS 34 together with RSD and RDST.In biphase reception all internal functions are clocked by signals derived from the incoming data stream. Consequently, as long as RSH and RLG are both generated the separation flip-flop SEP 101 (Fig. 8J) will operate properly and generate RO.
Biphase synchronization is established when RSE sets on the first start-bit following at least one idle bit. Eleven idle bits will reset RSE, but synchronization is not lost so long as data words are separated by no more than ten idle bits.
In NRZ reception internal operation is initiated by the start bit and terminated by the stop bit of each data word. All operations in between are clocked at the independent internal clock rate.
Operation begins when RSE 102 sets at the middle of the "zero" start bit following an idle condition of at least two bit times. RSE 102 then resets immediately following data transfer from the RDS register 34 to the Receiver Data Register 36.
For the case of a data rate faster than RO, the start bit is clocked into RB Register 31 which then toggles for the next eight bit times thus generating RS at the internal clock rate of the serial l/O controller. When the data rate is faster than RO the stop bit and the following start bit are successfully clocked into RB Register 31 earlier than nominal. The corresponding periods of the RO and RBDORBE clocks are consequently shortened by one or two RT times. At this highest data rate (for proper operation) RSE resets and data transfers one RT time sooner and synchronization during the following start bit is established 2 RT times sooner.
For the case of a data rate slower than RO, operation for the start bit and first seven data bits is identical to operation at high data rates. Operation during the eighth data bit and stop bit differs according to whether the last data bit is a "zero" or a "one".
If the last data bit is "zero", the generation of RO, the resetting of RSE, and the transfer of data are all delayed until the middle of the stop bit. The following start bit then re-initiates the sequence of operations necessary to receive one data word.
If the last data bit is "one", the generation of RO, the resetting of RSE, and the data transfer all occur at their nominal positions and nothing happens during the stop bit. The following start bit then re-initiates the receive cycle. Thus for slow data a "one" in the last data bit position acts similar to a stop bit, and everything holds during the actual stop bit until the start bit reinitiates the cycle.
TB Register 40 is a four-bit counter that counts continuously from 1 to 8 at the RT rate beginning at the end of RESET. The external clock TEX is the 50% duty cycle waveform available at TBD and hence is in phase with the transmitted data stream. TSH is a 2X clock occurring at the end of each bit. The only difference between the biphase and NRZ formats is in the operation of the formatting flip-flop TDST.
With regard to transmitter operation note that the idle line condition is established after the setting of TE and that data transfer occurs at the middle of the start bit. When TDE is not serviced before the middle of the stop bit it remains set and causes the TC counter to hold at the 9-count, thus inhibiting the data transfer. When TDE is reset, transmission resumes with the next start bit.
TSH.TO clocks in data from TSHf to TDST at each bit boundary for either format, and, during biphase only, TSH.TO clocks in a toggle for TDS# = 1, or if the line is idle, or during each stop bit.
In either the biphase or the NRZ format the transmitter works in the NRZ format except for the formatting flip-flop, TDST, which is essentially the transmiatter output stage. TDST is clocked by RSH (which occurs at twice the RO rate) and every other RSH coincides with RO.
The transmitter outputs ones as long as TSE is not set. TSE sets when the TC counter reaches the 10-count and remains set as long as TE = 1. Accordingly a preamble of ten ones is transmitted when TE is first turned on. At any time after the initial preamble of ten ones if a word has not been written into the Transmit Data Register 37, the TC counter holds at the 9count, and TDST continually outputs ones.
The serial I/O controller communicates with the CPU via the IRQ2 interrupts. If receiver interrupts have been enabled by RIE and by resetting WU, an IRQ2 interrupt is generated whenever an overflow or a framing error sets the OR bit or whenever transfer of a valid word from the Receive Shift Register 34 to the Receiver Data Register 36 sets the RDF bit. If transmitter interrupts have been enabled by setting TIE, an IRQ2 interrupt is generated whenever data transfer from the Transmitter Data Register 37 to the Transmit Shift Register 38 sets the TDE bit.
Use of the WU, the "wake-up" bit, is determined by the data link protocol. If after examination of the first part of a message the CPU ascertains that it has no further interest in the remainder of the message and sets WU, all further interrupts are inhibited until the line goes idle. The WU bit is reset by hardware whenever eleven contiguous "ones" are received, or it can be reset by software.
Each of the three interrupt bits RDF, OR, and TDE has a follower bit that sets whenever the Control and Status Register 46 is read while its associated bit is also set. The RDF and OR interrupt bits and their followers are reset whenever the Receive Data Register 36 is read while its associated follower bit is also set. The TDE interrupt bit and its follower are reset whenever the Transmit Data Register 37 is written while its follower is set.
Regarding the control of port 2, at the end of RESET the serial I/O controller overrides CPU control of from one to three pins of port 2 depending upon the operating mode defined by control bits RE, TE, CC1, and CCf. RE and TE determine the duplex configuration while CC1 and CCf determine the external clock configuration.
Pin 2 of port 2 may be used either to input an externally generated clock or to output a clock generated by the I/O controller. When CC1 = "0" this pin is controlled by the CPU but that when CC1 = "1" this pin is used to either input an external clock or output an internal clock.
When CC1 = "0" the I/O controller does not use pin 2 and accordingly the CC1.DDR2 coupler allows the CPU control signal WP2.DDR2 to determine the state of the pin 2 data direction latch comprising transmission gates 86 and 87, inverter 88, and NOR gates 85 and 89. When CC1 = "1" the CCf control bit determines the state of the data direction latch.
The pin data output register comprising NOR gates 90 and 91, inverters 92-94 and transmission gate 95 is handling CPU data when CC1 = "0", and is outputting TEX, the internally generated clock, when CC1.CC#= "1". When CC1.CC#= = "1" pin 2 is inputting an externally generated clock and the data output register is in a "don't care" state since the output drive is tri-stated (i.r. in a very high impedance state).
The data input buffer 96 inputs the external signal on pin 2 under all operating conditions.
However, it is only passed by the mode control logic when it is actually an external clock, i.e., whenCC1.CC#="1".
Pin 3 of port 2 is used to input serial data when the I/O controller is in the full-duplex or halfduplex receive modes. As long as the control bit RE = "1" the pin 3 data direction latch DDR 23 comprising NOR gate 98, inverters 99 and 106, and transmission gates 97 and 100 holds the output drive in the tri-state mode. The CPU controls DDR23 when RE = "O". The data input buffer 104 inputs the external signal at pin 3 under all conditions.
Pin 4 of port 2 is used to output serial data when the I/O controller is in the full-duplex or the half-duplex transmit modes. As long as TE = "1" the pin 4 data direction latch comprising inverter 107, NOR gates 108 and transmission gate 105 is held in the output state and the serial data, WT, is input to the pin 4 data output register comprising NOR gate 110, inverters 113 and 114, and transmission gates 111, 11 2 and 11 5. The CPU is in control when TE = "0".
The overall clocking management is depicted in Fig. 12. The four bits in the Rate And Mode Control Register 45 (Figs. 4 and 5) determine the source and frequency of the high-speed clock RT (generated over line 110 in Fig. 8A). RT is a 50% duty cycle clock at exactly 8 times the transmitted data rate and approximately 8 times the received data rate.
The transmitter clocks are: TSH-a pulse train at 2 times the data rate which is used to clock the formatting flip-flop TDST.
TO-the bit rate clock which drives the bit counter TC.
TSO-the Transmit Shift Register clock which is the same as TO with every 10th pulse missing.
Tout-a 50% duty cycle clock at the data bit rate which is available for transmission to remote devices.
The receiver clocks are: RSH-two pulses which are generated for every biphase "one" in the received data stream.
This clock does not exist in the NRZ format.
RLG-one pulse which is generated for every biphase "zero" in the received data stream. In the NRZ format RLG is identical to RO.
RS an embedded clock which is extracted from the received data stream and drives RC counter 32, Receive Shift Register 34, and the start-bit flip-flop RDST 35.
RBD#The clock, at the same rate as RO but RBE nearer mid-bit, which drives the separation (or deformatting) flip-flop RDS 33.
Of the five high-speed clocks provided, four are tapped off of the microcomputer timer 4 and the fifth can be input from an external source. All of the clocks have a 50% duty cycle and are at 8 times the data rate. The four timer clocks are designated T#, T3, T6, and T8 and correspond to #2 (the CPU clock) divided by 2, 16, 128, and 512 respectively.
Figs. 8A-8J constitute individual section of a preferred embodiment of the serial I/O logic of the present invention. The individual figures may be fitted together in the manner shown by Fig.
9 to form the complete serial I/O logic schematic of the Fig. 1 single-chip microcomputer.
Given the logic schematic of Figs. 8A-8J, one of ordinarly skill in the art is enabled to implement the serial I/O logic of the present invention by using existing circuit technology, such as MOSFET (Metal Oxide Semiconductor Field Effect Transistor) technology. A detailed recitation of the interconnections between the logic and circuit elements shown in Figs. 8A-8J would only encumber the description. However, various of the structures shown and described with regard to the general block diagram of Fig. 3 will be highlighted in the detailed logic schematic of Figs.
8A-8J.
Figure 8A shows the 4-bit TB Register comprising flip-flops 201-204.
Fig. 8B shows the TC Counter and Control Logic comprising flip-flops 211-215.
Fig. 8C and 8D show the Rate And Mode Control Register comprising flip-flops 221-224.
Also shown in Figs. 8C and 8D is the Control And Status Register comarising flip-flops 231-238.
Fig. 8E shows the Receive Data Register comprising flip-flops 241-248 and the Receive Shift Register comprising flip-flops 251-258.
Fig. 8F shows the Transmit Data Register comprising flip-flops 261-268 and the Transmit Shift Register comprising flip-flops 271-278.
Fig. 8G shows the bonding pad 320 for l/O pin 2 of port 2, as well as VDD pad 303, and Vss pad 304. The VDD and Vss signals will be understood to be distributed throughout the logic shown on Figs. 8A-8J as required.
Fig. 8H shows the bonding pad 321 for l/O pin 3 of port 2 and bonding pad 322 for I/O pin 4 of port 2.
Fig. 81 shows RC Counter And Control Logic comprising flip-flops 281-285 and shows in addition the RSE flip-flop 102.
Fig. 8J shows the RB Register comprising flip-flops 291-298. Fig. 8J also shows the SEP flip-flop 101, the RSD flip-flop 1 1 1, and the TDST flip-flop 1 12.
Fig. 10 shows the RESET bonding pad 323 and associated circuitry for generating the RESET signal over line 300, the MODL signal over line 301 and the VRBIAS signal over line 302. It will be noted that the RESET signal is sometimes designated as the POR signal in the logic diagram of Figs. 8A-8J.
The lines of Figs. 8A-8J which connect other portions of the microcomputer (not shown) will now be discussed. In Fig. 8A a TMR signal is transmitted over line 400 and signals T#, T6, T3, and T8 are transmitted over lines 401-404, respectively, to the microcomputer programmable timer 4 (Fig. 1) for purposes not associated with the object of the present invention. In Fig. 8D an interrupt control signal IWIS is transmitted over line 410 to the programmable timer. In Fig.
8F the individual lines of the Peripheral Data Bus 30, which bus transmits data to and from the serial I/O logic, are identified as PDBO-PDB7. In Fig. 81 signal PC2, which is transmitted over line 415, represents one of three program control bits in port 2, which program control bits are used to program the mode of operation of the microcomputer in a manner unassociated with the objects of the present invention. Also shown in Fig. 81 is a signal IRSB on line 416, which signal is merely a control signal generated by the CPU. Further shown in Fig. 81 are some of the internal microcomputer address lines identified as A1-A4 and the Read/Write control line identified as R/W.
Fig. 11 illustrates schematically a clock generator 420 for generating clock signals f2 and f2 used for internal microcomputer operations. Signals f #1 and #2 are generated from master clock E and the relationship between clocks E, #1, and #2 is shown by Fig. 13.
The serial I/O controller should be initialized by the microcomputer ROM software prior to operation. This sequence will normally consist of (1 ) writing the desired operation control bits to the Rate And Mode Control Register 45 and (2) writing the desired operational control bits in the Control And Status Register 46. The Transmitter Enable (TE) and Receiver Enable (RE) bits may be left set for dedicated operations.
Reference may be made to Fig. 14 for a flow chart of the reset operation. During reset the Transmit Data Register 37, the Receive Data Register 36, and all of the status and control bits in both the Rate and Mode Control Register 45 and the Control and Status Register 46 are reset with the exception of control bit TDE which is set to indicate that the Transmit Data Register 37 is empty. In addition, the TB Register 40 is reset, the RB Register 31 is stopped (not reset), and the serial I/O pins of port 2 (P22, P23, and P24) are configured as input. Although an external clock may be available from P22 the RB Register 31 is stopped because no clock is available from the Timer 4 during this time.
In addition to the possible external clock four more clock speeds (submultiples of f2) become available from Timer 4 at the end of reset. Since MCR = 0, the highest-speed clock TO (= #2 . 2) is selected by the mode logic as the high-speed clock RT. RT clocks both the RB and TB Registers which run continuously during RESET. The input to the RB Register is held' at "one" until RE is set, while TB counts continuously.
TSH and TO are derived logically from the TB Register and are used to clock the formatting flipflop TDST 112 (Fig. 8J) and the transmitter bit counter TC (TA through TCD in Fig. 8B), respectively. Every tenth TO clock is suppressed by the transmitter bit counter logic to generate TSO, the Transmit Shift Register clock.
It is thus seen that at the end of reset the serial l/O controller is functioning in a degenerate mode with the transmitter bit counter running at the highest speed. The formatting flip-flop TDST 112 is toggling in the biphase format, with the port 2 pins not properly configured. The receiver RB Register is also being clocked at the highest speed but fills up with "ones" and hence cannot generate the clock for the de-formatting flip-flop RSD 111 (Fig. 8J) which remains in an arbitrary state.
Non-trivial operation begins with the writing of four control bits into the Rate and Mode Control Register 45. These bits (CC1, CC, S1, S#) select the desired clock source and speed, determine the data format, and configure the clock pin (P22) as required. Next, five control bits are written into the Control and Status Register to complete the mode specification. Two of these bits (TIE and RIE) determine whether or not interrupts are masked. Two other bits (RE and TE) determine whether operation is half-duplex (either transmitting or receiving) or full duplex.
The fifth bit (WU) is used for the Wake-up mode which will be explained under Receive Operation.
The transmit operation is enabled by the TE bit in the Control and Status Register 46. This bit, when set, gates the output of the serial Transmit Shift Register 38 to port 2 pin 4 and takes precedence over the Data Direction Register value for port 2.
Following a RESET, both the Rate and Mode Control Register 45 and the Control and Status Register 46 should be configured for desired operation. Setting the TE bit during such procedure initiates the serial output by first transmitting a nine-bit preamble string of 1 's.
Following the preamble, internal synchronization is established and the transmitter section is ready for operation.
At this point one of two situations exist: (1) if the Transmit Data Register 37 is empty (TDRE = 1), a continuous string of ones will be sent indicating an idle line, or (2) if data has been loaded into the Transmit Data Register 37 (TDRE = 0), the word is transferred to the Transmit Shift Register 38 and transmission of the data word will begin.
During the transfer itself, the 0 start bit is first transmitted. Then the 8 data bits (beginnning with bit 0) followed by the stop bit are transmitted. When the Transmit Data Register 37 has been emptied, the hardware sets the TDRE flag bit.
If the microcomputer CPU 1 fails to respond to the flag within the proper time (TDRE is still set when the next normal transfer from the Transmit Data Register 37 to the Transmit Shift Register should occur), then a 1 will be sent (instead of a 0) at the "Start" bit time, followed by more l's until more data is supplied to the Transmit Data Register 37. No O's will be sent while TDRE remains a 1.
The biphase mode operates as described above except that the serial output toggles each bit time, and also on 1/2 bit times when a 1 is sent.
Reference may be made to the flow chart of Fig. 15 for a summary of the operation in the half-duplex transmission mode. When TE is set the transmit pin P24 is configured to output by holding DDR24 at zero. As long as TE is set CPU operation of both DDR24 and P24 is inhibited.
Setting TE also releases the transmitter bit counter (TC) from reset. TC counts continuously during TE = 1 at the TO clock rate, but will hold at the 9-count as long as status bit TDE remains set. Transmission synchronization is established when TSE sets during the 9-count. When the interrupt caused by TDE = 1 is serviced, a new data word is loaded into the Transmit Data Register 37 and TDE is reset. Resetting TDE allows TC to resume counting.
Transmission begins at the middle of the TC 10-count when TSH 426 (Fig. 8A) clocks the start bit into the formatting flip-flop TDST 11 2 (Fig. 8J). The data word is transferred from the Transmit Data Register 37 to the Transmit Shift Register 38 at the end of the 1 0-count. If the data is to be transmitted in the biphase format the TDST toggle that would normally have occurred at the end of the TC 10-count is inhibited, thus establishing the transmitted data bit boundaries at the mid-points of each TC counter state.In the NRZ format the transmitted bit boundaries are also established at the mid-points of each TC counter state, but here the controlling factor is that TDST can only change state on the trailing edge of the next TSH clock which occurs after TDS# changes state, i.e. the TSH clock which occurs between TSH clocks.
The receive operation is enabled by first configuring the Rate and Mode Control Register 45 and then writing a 1 to the RE bit in the Control and Status Register 46. In the NRZ format, the receiver is immediately ready to accept data. In biphase format, however, it is necessary to present an idle line (toggling at half-bit times) to the receiver for at least one bit time to permit synchronization to occur.
The receiver bit interval is divided into 8 sub-intervals for internal synchronization. In the standard, non-biphase mode, the received bit stream is synchronized to the leading edge of the first 0 (space) encountered.
The approximate centre of each bit time is strobed during the next 10 bits. If the tenth bit is not a 1 (stop bit), a framing error is assumed, and bit ORFE is set. Note that RDRF is not set for a a framing error. If the tenth bit is a 1, the data is transferred to the Receive Data Register 36, and interrupt flag RDRF is set. If RDRF is still set at the next tenth bit time, ORFE will be set, indicating an over-run has occurred. When the CPU 1 responds to either flag (RDRF or ORFE) by reading the Control and Status Register 46 followed by reading the Receive Data Register 36, RDRF (and ORFE) will be cleared.
In the biphase mode, it must be determined whether a transition interval is more or less than 6 of the 8 sub-intervals. Pairs of short intervals are defined as I 's, while long intervals are defined as O's. If RE is set during a string of 1 '5, the receiver cannot distinguish between bit and mid-bit boundaries. Proper bit synchronization occurs the first long (zero) transition interval.
Synchronization to byte boundaries occurs when eight 1 's followed by a zero are received.
Reference may be made to Fig. 16 for a summary of the operation in the receive half-duplex mode. When RE is set the receive data pin, P23, is configured to input by holding DDR23 at "1". As long as RE remains set CPU operation of both DDR23 and P23 is inhibited. Setting RE also allows the RB Register 31 to start clocking in the data on the input line. The remaining receiver mode description is separated into NRZ operation and biphase operation.
NRZ receiver operation begins when the idle lines goes to zero indicating arrival of the start bit. Receiver synchronization is established by setting RSE at approximately the middle of the start bit. RO is derived logically from the RB Register 31 which runs continuously as long as RE is set. RO clocks the Receive Shift Register 34 and the receiver bit counter RC. In the NRZ format the separation flip-flop RSD 111 (Fig. 8J) acts merely as another bit of the Receive Shift Register 34 to hold the stop bit, and it is clocked by RBDORBE, which lead RO by 1/4 bit time.
In NRZ reception the incoming start bit is input to the RB Register 31 to synchronize one frame by setting RSE 102 (Fig. 81). For the next nine bits of the frame RB Register 31 toggles to generate RO and the RSD clock. The data stream is clocked into RSD 111, the Receive Shift Register 34, and RST 250. If no framing error exists the eight data bits are transferred to the Receive Data Register 36, and the RBF status bit is set to indicate receipt of one correct word. If a framing error has occurred or if a previous RDF has not been serviced and reset the OR status bit is set to indicate an overrun. RSE resets the RC 10-count.
Biphase receiver operation begins with receipt of a "zero" which has been preceeded by at least one "one". Receiver synchronization is established by setting RSE 102 at approximately the middle of the start bit. RSH and RLG are derived logically from the RB Register and are used to control the separation flip-flop SEP 101. The separation logic generates the receiver bit clock RO which drives the receiver bit counter RC. RSH clocks the RSD flip-flop 111 which transforms the biphase data format to the NRZ format. From this point on the Receive Shift Register 34 and RDST 35 function as in NRZ format mode of operation, with the exception that RSE 102 does not automatically reset during the 10-count and set during the start bit.
A full duplex operation is initiated by setting both RE and TE. The operation of the transmitter is independent of the receiver except for the data format and rate.
The wake-up capability is intended to increase the throughput of the CPU in multi-processor applications by permitting non-interested CPU's on a common line to ignore the remainder of a message being transmitted. A processor wishing to invoke the wake-up feature sets the wake-up bit (WU) in the Control and Status Register 46. With the wake-up bit set, the receiver section continues to process messages, but does not set the RDRF flag bit. This effectively masks the message from the processor. Upon receiving eleven consecutive 1 '5, the receiver section clears the wake-up bit, thus enabling normal flag operation. Refer to Fig. 6 wherein a master CPU 500 communicates with only Slave CPU 505. Slave CPUs 503 and 504 ignore the message on serial bus 502.
It is important to consider the duties of the transmitter processor during wake-up operation. A "message" is considered to consist of a string of characters transmitted in such a manner that the transmission line does not go idle within the message for a period sufficient for a receiver in wake-up operation to clear its wake-up bit. The wake-up bit is cleared (or reset) by a string of eleven consecutive ones. It is important to realize that both data and the stop bit count in the total of eleven ones. Software servicing the transmitter will store the next character in the Transmit Data Register 37 upon detecting the TDRE is equal to "1". The transmission line will be kept busy shifting out the current character for 10 bit times (1 start bit, 8 data bits, 1 stop bit) at which time the line will go idle if the transmitter has not been serviced.If the last byte transmitted was all ones (SFF), the transmitter has a total of 11 bit times to respond to the TDRE flag before a receiver will see eleven consecutive ones. If the most significant bit of the data was a zero, the transmitter service routine has a total of 13 bit times to respond to the TDRE flag before affecting the wake-up bit. These two cases represent the minimum and maximum response times required by the transmitter service routine in order to keep the receivers in wake-up.
After the last character of a given message has been sent. it is also the duty of the transmitter to idle the line for the required time before beginning the next message. The time required is data-dependent, as are the response times. If the last byte sent was all ones, the transmitter must wait a total of 12 bit times (after servicing the TDRE flag) before beginning the next message. The maximum wait is required if the most significant bit of the last byte transmitted was a zero. With this condition, the transmitter must wait a total of 20 bit times before beginning the next message.
A receiver service routine wishing to invoke the wake-up mode usually makes this decision after determining that it is not an addressee for a particular message. The receiver routine may then effectively ignore the remainder of the message by setting the wake-up bit. It is important to realize that the wake-up bit cannot be set if the transmission line is idle. With the wake-up bit set, the RDRF flag bit will not be set during the remainder of the message. Providing the RDRF flag bit is clear, the ORFE bit will be set upon receipt of the next character of the current message. When the receiver section detects eleven consecutive ones on the transmission line, the wake-up bit will clear and the RDRF flag bit will be set upon receipt of the first character of the next message.
During reset the microcomputer is set to its initial state and the only active signals are the +, and 02 clocks, which run as long as power is applied to the chip. At the end of reset the Timer counter starts operating with the rising edge of the +2 clock. In general, initiation of serial l/O operation requires execution of two or three write instructions, but since the serial I/O comes out of reset in the biphase format at the highest data rate, it may be possible to initiate operation with only one write instruction. The 16 data modes are possible: four data rates (see Table 1) for each of biphase, NRZ (no clock), NRZ (internal clock) and NRZ (external clock).
If at the end of reset the first desired usage of the serial I/O is to receive biphase data at the highest data rate, this mode can be established with one write instruction. Setting RE will establish the reception mode. Since the RB Register 31 begins filling up with "ones" as soon as the RT clock starts, at least one idle bit must preceed the start bit to insure generation of an RLG pulse on the leading edge of the start bit. If the start bit happened go be a high value there would be no leading edge to generate the first RLG and synchronization would not be established.
If a mode other than MCR = O is desired or if the current mode is to be changed, two write instructions must be executed, one for the Rate and Mode Control Register 45, and one for the Control and Status Register 46. The format and data rate are determined by the former, and the duplex and control modes are determined by the latter.
The waveforms of MCR = 1, 2, and 3 are the same as those in the case where MCR = 0 with the exception that the setting of RE is delayed 5 more 02 times, since the Rate and Mode Control Register must be written also. Initiation of NRZ operation (MCR24) can occur after reset as soon as RE is set.
In addition to establishing the data, control, and duplex modes it may be necessary to write data to the Transmit Data Register 37. If it is desired to begin transmission as soon as possible, the data word is written to the Transmit Data Register 37, and then the bits of the Control and Status Register 46 should be configured to TDRE = 0 and TE = 1. Loading the Transmit. Data Register before loading the Control and Status Register allows data transfer and data transmission to begin immediately.
If the transmission is to be interrupt-driven TDE is left set, and the interrupt service routine handles the writing of the Transmit Data Register 37.
The serial I/O allows interrupt service routines to monitor its operation. Transmitter interrupts are enabled by setting TIE, and receiver interrupts are enabled by setting RIE.
If a polling operation is desired, interrupts can be disabled by resetting either TIE or RIE or both.
Fig. 17 illustrates the detailed circuit diagram of the D flip-flops shown in the detailed logic diagram of Figs. 8A-8J, as, for example, used to implement flip-flops RBA-RBH (291-298) in Fig. 8J.
Fig. 18 illustrates a detailed circuit diagram corresoponding to the D flip-flops with reset, as used, for example, to implement flip-flops TBA-TBD in Fig. 8A.
Fig. 19 illustrates a detailed circuit diagram corresponding to the coupled latches with set and reset, as used, for example, to implement flip-flaps TSE 427 (Fig. 8B) and RDF 235 (Fig. 8D).
Fig. 20 illustrates a detailed circuit diagram corresponding to the coupled latches with S and R inputs, as used, for example, to implement flip-flop RSE 102 in Fig. 81.
Fig. 21 illustrates a detailed circuit diagram corresponding to the latch with reset used, for example, to implement flip-flops RBO-RB7 in Fig. 8E.
Fig. 22 illustrates a detailed circuit diagram corresponding to the follower latches used, for example, to implement latches RUFF, TFF, and ORF in Fig. 8D.
The operation of the serial I/O communication logic illustrated in Figs. 8A-8J, 10 and 11 may be summarized by the following logic equations: CONTROL SIGNALS BP = CC1 . CCf
RSEs, = BP.RBD.RBE.P23 + BP.LG RSE R = RE + RXFR.(BP + SH) + RCD.RCE .RSD.R# RSEE =w RSH = RBA.RBF.RBG + RBA.RBF.RBG RLG = RBA.RBF.RBG + RBA.RBF.RBG SEPd= SEP SEPR = RLG SEPC = RSH RH = RLG + RSH.SEP RXFR*= RSE.RCD.RCE.RSD.R H RXFR = RXFR*.#, XFR = RXFR.RDF RT = (CC1 + CCi.(S1 .S+.Tf + S1.S#.T3 + S1 .S#.T6 + S1.S9.T8) + CC1 .CC+.P22 TSEs = TCD.TCE.TO TSER = TE TSEF= Tfl TSH = TBC.TBD + TBC.TBD TO = TBC.TBD TSA = TO. (TCA + TCE) TXFR* = TSE.TCA.TCE.TO TXFR = TXFR*.#1 CONTROL AND STATUS REGISTER WUWR= PDB. WSR.Reset WUc = WSR.
WUR = R81 +RE RDFWR = RXFR.Reset. WU RDFR = RFF.RRD RDFE= RXFR RIFF,, = RDF.RSR RFFR = RDF TDEWR = TXFR + Reset TDE, = TFF.WTD TFFWR = TDE.RSR TFFR = TDE + Reset ~~~~ ~~~~ ~~~~~ ORWR = (RDF.RXFR + RCD.RCE.RSD.WU.RO).Reset OR, = ORF.RRD Ore = RDF.RXFR + RCD.RCE.RSD.WU.RS ORFWR = OR.RSR ORFR = OR ~~~~ SCRnwR = PDB0.WSR.Reset 1#n#4 TE = SCR 1 TIE = SCR2 RE=SCR3 RIE = SCR4 RATE AND MODE CONTROL REGISTER MCRnwR = PDBn.WMR.Reset 0#n#3 S#= MCR# S1 = MVR 1 CCf =MCR2 CC1 = MCR3 MCRnc =WMR RECEIVE DATA REGISTER RDRnWR =XFR. RDSn 0#n#17 RDRnR = Reset 0#n#7 TRANSMIT DATA REGISTER TDRnWR = PDBn.WTD 0#n#7 TDRnR = Reset 0#n#7 RB REGISTER ~~~ ~~~ RBAD = RE + BP.P23 + BP.RBH.(RCA + RCD) + RCA.RCD.(WU + RBH).P23 RBBD = RBA RBDD = RBB RBDD = RBC RBEE= RBD RBFD = RBE RBGD = RBF RBHD = RBG RBAC = RBBC = RBCc = RBDc = RBEc = RBFc = RBGc = RBHc = RT TB REGISTER TBAD=TBD TBBD = TBA TBCD = TBB TBDD = TBC TBAR = TBBR = RBCR = TDBR = Reset TBAc = TBBc = TBCc = TBDc = RT RC COUNTER RCAD = RSE.RCE RCBD = RCA RCCD = RCB RCDD = RCC RCED = RCD RCAR = RCBR = RCCR = RCDR = RCER = RSE RCAC = RCBC = RCCc = RCDc = RCEC = R# TC COUNTER TCAD = TCE TCBD = TCA TCCD = TCB TCDD = TCC TCED = TCE.TDE TCAR = TCBR = TCCR = TCDR = RCER = TE TCAc = TCBc = TCCc = TCDc = TCEc = T# RECEIVE SHIFT REGISTER RSDD = BP.SEP + BP.P23 RSDR = BP.LG RSDc = BP.RHS + BP.(RBD0RBE) RDSc = RLG.BP.RSH + BP.(RBDo+RBE) RDS7D = RSD RDSnD = RDS (n + 1) 0#n#6 RDSnC = R# 0#n#7 RDSTD = RDS# RDSTc = R# TRANSMIT SHIFT REGISTER TDSTD = "1" TDS7WR = TXFR.TDR7 TDSnD = TDS (n + 1) 0#n#6 TDSnWR = TXFR. TDRn 0#n#6 TDSZ= TSO.TXFR 0#n#7 TDSnC = TSA 0#n#7 TDSTD = BP.T#.TSE. ((TCA + TCE).TDS#]+TDST] + BP. [ TSE + (TCA + TCE).TDS#] TDSTc = TSH OUTPUT SIGNALS TEX = TBD IRQS = RIE.(RDF + OR) + TIE.TDE PDB, = R/W.(RDRn.RDR + SCRn.SCR)~~ 0#n#7 P022 = PDB2.WI02.CC1 + TEX.CC1.CC# P023 = PDB3.WI02 ~~ P024 = PDB4.W102.TE + TDST.TE P2n = DDR2.lN2n + DDR2.P02n 0#n#4 IN2n = data at the pin 0#n#4 DATA DIRECTION REGISTERS DDR22 = PDB2.DDR2.CC1 + CC1.CX + Reset DDR23 = PDB3.DDR2 + RE + Reset DDR24 = PDB4.DDR2.TE + Reset ADDRESSES
SIO = PS.A4.A3.A2 P12 = PSZA4.A3.A2 MCR = SIO.A1.A0 WMR = R/W.MCR.#2 SCR = SIO.A1.A0 RSR = R/W.SCR.# WSR = R/W.SCR.#2 RDR = SIO.A1.A0 RRD = R/W.RDR.#2 TDR = SIO.A1.A0 WTD = R/W.TDR.#2 DDR2 = R/W.P12.A1-A0 RIO2 = R/W.P12.A1.A0 W102 = R/W.P12.A1.A0.
TABLE II DATA LINK CONFIGURATIONS Port 2 Pin Configuration Operation External No. Pins Mode Clock Used P22 P23 P24 BP . Receive no 1 not used input not used BP . Transmit no 1 not used not used output BP . Full-Duplex no 2 not used input output NRZ . Receive no 1 not used input not used NRZ . Transmit no 1 not used not used output NRZ . Full-Duplex no 2 not used input output NRZ . Receive yes 2 input input not used or output NRZ . Transmit yes 2 input not used output or output NRZ. Full-Duplex input 3 input input output NRZ. Full-Duplex output 3 output input output Clock Only output 1 output not used not used

Claims (10)

1. A microcomputer having serial I/O communication logic, wherein said serial I/O communication logic comprises means for transmitting and receiving serial information in NRZencoded format, and means for transmitting and receiving serial information in biphase-encoded format.
2. A microcomputer having serial I/O communication logic, wherein said serial I/O communication logic comprises: means for transmitting and receiving serial information in NRZencoded format, means for transmitting and receiving serial information in biphase-encoded format, bistable storage means, and means for setting said bistable storage means to a first state when said NRZ-encoded format is utilized by said microcomputer, and means for setting said bistable storage means to a second predetermined state when said biphase-encoded format is utilized by said microcomputer.
3. A microcomputer as claimed in Claim 2 wherein said means for setting said bistable storage means is software addressable.
4. In a microcomputer having serial I/O communication logic for receiving and transmitting serial information over a serial I/O line, said serial I/O communication logic comprises bistable storage, means, and means for setting said bistable storage means to a predetermined state if said microcomputer desires not to receive serial information on said serial I/O line.
5. A microcomputer as claimed in Claim 4 comprising means for setting said bistable storage means to the opposite state if said microcomputer desires to receive serial information on said serial I/O line.
6. In a microcomputer having serial I/O communication logic for receiving serial information over a first serial I/O line and transmitting serial information over a second serial I/O line, said serial information having an address portion and a message portion, said serial I/O communication logic comprising address recognition means and message reception means, wherein said serial I/O communication logic comprises bistable storage means, means for setting said bistable storage means to a predetermined state if said address recognition means does not recognize the address portion of serial information received on said first I/O line, and means responsive to said predetermined state of said bistable storage means for inhibiting said message reception means from receiving the message portion of said serial information received on said first I/O line.
7. A microcomputer as claimed in Claim 6 comprising means for resetting said bistable storage means when said message portion of said serial information is no longer present on said first I/O line.
8. A digital circuit for separating data and clock signals in a Manchester-encoded data stream having a clock frequency f, said digital circuit comprising means for providing an additional clock of frequency Nf, where N is a positive integer greater than 2, a shift register having at least N + 1 stages, the first stage of said shift register being responsive to said data stream, and digital logic means respective to the output of individual stages of said shift register for separating said data and clock signals.
9. A digital circuit as claimed in Claim 8 wherein N = 8.
10. A microcomputer having serial I/O communication logic and substantially as hereinbefore described and as shown in the accompanying drawings.
GB7926734A 1978-09-05 1979-08-01 Biphase microcomputer serial communication logic Expired GB2029172B (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
US05/939,743 US4346452A (en) 1978-09-05 1978-09-05 NRZ/Biphase microcomputer serial communication logic
US05/939,742 US4361876A (en) 1978-09-05 1978-09-05 Microcomputer with logic for selectively disabling serial communications
US05/939,744 US4222116A (en) 1978-09-05 1978-09-05 Digital logic for separating data and clock in Manchester-encoded data

Publications (2)

Publication Number Publication Date
GB2029172A true GB2029172A (en) 1980-03-12
GB2029172B GB2029172B (en) 1982-12-22

Family

ID=27420694

Family Applications (1)

Application Number Title Priority Date Filing Date
GB7926734A Expired GB2029172B (en) 1978-09-05 1979-08-01 Biphase microcomputer serial communication logic

Country Status (5)

Country Link
DE (1) DE2935847A1 (en)
FR (1) FR2435758B1 (en)
GB (1) GB2029172B (en)
MY (1) MY8500476A (en)
SG (1) SG16684G (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1990009713A1 (en) * 1989-02-17 1990-08-23 Robert Bosch Gmbh Network interface
FR2706650A1 (en) * 1993-06-11 1994-12-23 Renault Process for decoding the header of a communication message
EP3961970A4 (en) * 2019-04-24 2022-12-28 OMRON Corporation Serial data communication device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US3699525A (en) * 1970-11-27 1972-10-17 Honeywell Inf Systems Use of control words to change configuration and operating mode of a data communication system
US4071887A (en) * 1975-10-30 1978-01-31 Motorola, Inc. Synchronous serial data adaptor

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1990009713A1 (en) * 1989-02-17 1990-08-23 Robert Bosch Gmbh Network interface
FR2706650A1 (en) * 1993-06-11 1994-12-23 Renault Process for decoding the header of a communication message
EP3961970A4 (en) * 2019-04-24 2022-12-28 OMRON Corporation Serial data communication device
US11960432B2 (en) 2019-04-24 2024-04-16 Omron Corporation Serial data communication device and serial data communication method

Also Published As

Publication number Publication date
DE2935847C2 (en) 1987-02-05
FR2435758B1 (en) 1986-08-22
FR2435758A1 (en) 1980-04-04
GB2029172B (en) 1982-12-22
DE2935847A1 (en) 1980-03-13
MY8500476A (en) 1985-12-31
SG16684G (en) 1985-02-15

Similar Documents

Publication Publication Date Title
US4361876A (en) Microcomputer with logic for selectively disabling serial communications
US6687769B2 (en) Serial peripheral interface with high performance buffering scheme
US4346452A (en) NRZ/Biphase microcomputer serial communication logic
US3988716A (en) Computer interface system
US5561826A (en) Configurable architecture for serial communication
US5140680A (en) Method and apparatus for self-timed digital data transfer and bus arbitration
EP0380856A2 (en) Method and apparatus for interfacing a system control unit for a multi-processor
US5590292A (en) Scalable tree structured high speed input/output subsystem architecture
US4451898A (en) Asynchronous interface message transmission using source and receive devices
US5416909A (en) Input/output controller circuit using a single transceiver to serve multiple input/output ports and method therefor
US6212593B1 (en) Method and apparatus for generating interrupts on a buffer by buffer basis in buffer descriptor ring direct memory access system
US5812875A (en) Apparatus using a state device and a latching circuit to generate an acknowledgement signal in close proximity to the request signal for enhancing input/output controller operations
JP2004318901A (en) High-speed control and data bus system mutually between data processing modules
US4222116A (en) Digital logic for separating data and clock in Manchester-encoded data
US5687388A (en) Scalable tree structured high speed input/output subsystem architecture
US3921137A (en) Semi static time division multiplex slot assignment
WO1984002629A1 (en) Method and apparatus for bus contention resolution
US4430702A (en) Network access device
US5884044A (en) Dedicated DDC integrable multimode communications cell
US5564061A (en) Reconfigurable architecture for multi-protocol data communications having selection means and a plurality of register sets
US3623010A (en) Input-output multiplexer for general purpose computer
US4468737A (en) Circuit for extending a multiplexed address and data bus to distant peripheral devices
GB2029172A (en) NRZ/biphase microcomputer serial communication logic
US4225917A (en) Error driven interrupt for polled MPU systems
US4437158A (en) System bus protocol interface circuit

Legal Events

Date Code Title Description
PCNP Patent ceased through non-payment of renewal fee

Effective date: 19980801