-
2022-09-23 12:40:14
Z80230/Z85230/L Enhanced Serial Communication Controller
Pin Description The Enhanced Serial Communications Controller (ESCC) pins are divided into seven functional groups:
1. address/data
2. Bus Timing and Reset
3. equipment control
4. interrupt
5. Serial data (two channels)
6. Peripheral control (two channels)
7. Clock (two channels)
Z80230 and Z85230/L. The pin functions are unique for each bus interface version.
In the Address/Data group, the Bus Timing and Reset group, and the Device Control group.
The address/data group is used by the CPU and ESCC (in Z80230 the address is latched by the AS). The direction of these lines depends on whether the operation is a read or a write. The time and control groups specify the type of transaction to occur and when it occurs. Interrupt groups provide inputs and outputs for handling and prioritizing interrupts. The remaining groups are channel A and channel B groups. for:
Serial data (transmit or receive)
Peripheral device control (such as DMA or modem)
Input and output lines for receive and transmit clocks
Pins common to Z85230/L and Z80230
The pin descriptions for the pins shared by the Z85230/L and Z80230 are as follows: CTSA, CTSB (clear to send (input, active low)) - these pins are used as transmitters if they are programmed to auto-enable (WR3 bit 5 is 1), then Enable, in which case a low level on each input of A enables each transmitter to operate. If not programmed to auto-enable, the pin can be used as a general-purpose input. These pins are Schmitt trigger buffered to accommodate slow rise time inputs. ESCC detects pulses on these pins and can interrupt the CPU on two logic level transitions.
DCDA, DCDB (Data Carrier Detect (input, active low)) - These pins function as follows. If the receiver is programmed to auto-enable (WR3 bit 5 is 1), the receiver is enabled; otherwise, they function as general purpose input pins foot. The pins are buffered by Schmitt triggers to regulate slow rise time signals. ESCC detects pulses on these pins and may interrupt the CPU on two logic level transitions.
RTSA, RTSB (Request to send (output, active low)) - RTS pin can be used as a general purpose output or with auto-enable. When auto-enable is off, these pins follow the inverse state of bit 1 of WR5. When used in asynchronous mode with the auto-enable function, when WR5 bit 1 is 1. When WR5 bit 0 is 0, this pin is held low until the transmitter is empty. In Synchronous Data Link Control (SDLC) mode, the RTS pin can be programmed to de-assert when the message's close flag clears the TXD pin if WR7' bit 2 is 1, WR10 bit 2 is 0, WR5 bit 1 is 1 0.
Synca, Syncb (Sync (input or output, active low)) - These pins can be used as input, output or part of a crystal oscillator circuit. In asynchronous receive mode (with crystal oscillator option not selected), these pins are inputs similar to CTS and DCD. In this mode, transitions on these lines will affect the state of the sync/
Read the hunt status bits in register 0, but have no other function.
In external sync mode, the crystal oscillator is not selected and these lines also serve as inputs. In this mode, sync is driven low and the last bit of the sync character is received two Rx clock cycles. The character set starts from the rising edge of the receive clock before synchronization is activated.
In internal sync modes (single-sync and double-sync), the crystal oscillator is not selected and these pins are outputs. Each time these outputs go low, a sync pattern is recognized regardless of character boundaries. In SDLC mode, the pin switches from input to output when programming single sync, double sync or SDLC and sync mode is enabled.
DTR/REQA, DTR/REQB (Data Terminal Ready/Request (Output, Active Low)).
These pins are programmable (WR14 bit 2) to be used as general purpose outputs or as DMA request lines. When programmed for the DTR function (WR14 bit 2 is 0), these outputs are the inverse of the DTR bits written to register 5 (WR5 bit 7). When programmed for request mode, these pins act as DMA requests to the transmitter.
When using the DMA request line (WR14 bit 2 is 1), the time to cancel the request can be programmed in write register 7' (wr7') bit 4. If this bit is 1, then the DTR/REQ PIN is the same as the W/REQ PIN The same time disappears. If 0, DTR/Lexon is four clock cycles, same as Z80C30/Z85C30.
Wait/request (programs for output, open drain, etc.) functions, program when driven high and low The request function can program dual purpose outputs as request lines or wait lines for the DMA controller to synchronize the CPU to the ESC data rate. The recovering nations are waiting. receive data (input, active high)) - these inputs receive serial data standard transistor - transistor logic level receive/transmit clock (input, active low)) - these loose can be
Programmed to several modes of operation. In each channel, RTXC may supply the following:
•Receive Clock and/or the Transmit Clock
•Clock for the Baud Rate Generator (BRG)
•Clock for the digital phase-locked loop
These pines can also be programmed to use the corresponding synchronized pines as crystals. The oscillator receive clock can be 1, 16, 32 or 64 times the data rate in asynchronous mode. sendData(output, active high)) - These outputs send serial data at standard TTL levels.
Transmit/Receive Clocks (input or output, active low) - These PINS can be programmed in several different modes. When configured as an input TRXC can provide the receive clock and/or the transmitter clock. When configured as an output, the TRXC can echo the clock output of a digital phase-locked loop, crystal oscillator, BRG, or transmit clock. This clock is used to synchronize the internal main Escc clock.
Signal PCLK is a TTL horizontal signal. PCLK does not require any phase relationship. Switches used in (input, active high) with the main system clock when there are more devices than one switch driving the daisy chain. A high IEI indicates that no high priority device has an interrupt under service (IUS) or needs an interrupt switch to turn the output on (output, active high)) - only IEO is high and the CPU is not an ESC interrupt. The drive is also lower if ESCAP calls for a break during a new knowledge cycle break. The IEO can be connected to the IEI input of the next priority device, in which case it suppresses interrupts for the lower priority device.
INT (interrupt (output, open drain, active low)) - when ESCC requests an interrupt. int is an open drain output.
INTACK (Interrupt Acknowledge (input, active low)) - This pin is a strobe light to indicate that an interrupt acknowledgement loop is in progress. During this cycle, ESCC
Broken daisy chain resolved. The device can return an interrupt vector encoded using the interrupt pending type. During the acknowledge cycle, if IEI is high, ESCC places the interrupt vector on the data bus when the Z85230's RD is active. Or when DS is active for Z80230. Intack by
Pin descriptions other than the Z85230/L are as follows: Pins D7–D0 (Data Bus (Bidirectional, Tri-State)) - These pins carry data and commands from the Z85230/L to the Z85230/L. CE (Chip Enable (input, active low)) - This pin selects the Z85230/L for read or write operations.
RD((read(input, active low)) - This pin indicates a read operation, when the Z85230/L is selected, the bus driver of the Z85230/L is enabled. During the interrupt acknowledgement cycle, if the Z85230/L is the highest requesting interrupt priority device, RD gates the interrupt vector into the bus.
wr (write (input, active low) - When the Z85230/L is selected, this pin represents a write operation, indicating that the CPU writes a command byte or data to the Z85230/L write register.
Note: Simultaneous WR and RD going low is interpreted as a reset. A/B (Channel A/Channel B (input)) - This pin selects whether a read or write operation occurs. High selects channel A and low selects channel B.
D/C (Data/Control Select (Input)) - This signal defines the type of information transmitted to or from the Z85230/L. High indicates data transfer and low indicates command transfer.
Pin descriptions other than the Z80230 are as follows: AD7–AD0 (Address/Data Bus (Bidirectional, Active High, Tri-State)) - These multiplexed lines carry register addresses as well as data or control information to the Z80230.
From Z80230 to Z80230.
R/W (read/write (input, read active high)) - This pin specifies whether the operation is a read or write operation.
CS0 (Chip Select 0 (input, active low)) - This pin is associated with the address on A-A0, must be low for the expected bus transaction to occur.
CS1 (Chip Select 1 (input, active high)) - The second chip select pin must be high before and during an expected bus transaction.
DS (Data Strobe (input, active low)) - This pin provides timing for data transfers. In and out of the Z80230. If both as and ds are low, this condition is interpreted as a reset. AS (Address Strobe (input, active low)) - The address on A7-A0 is latched by the rising edge of this signal.
System communication between input/output capabilities and the ESCC uses the ESCC register set. There are 17 write registers and 16 read registers. Many features on ESCC are enabled through a new register in ESCC: Write Register 7 Primer (WR7). This new register can be accessed if bit 0 or WR15 is set to 1.
Registers can be read. Depending on its content, the CPU does one of three things:
1. data input
2. read data
3. Continue to process the two bits in the register to indicate the request for data transfer.
interrupt
The ESCC interrupt mode supports vectored interrupts and nested interrupts. Fill level for which transmit and receive FIFOs interrupt the CPU is programmable, allowing
ESCC requests to schedule data transfers to the system interrupt response time. Interrupt confirmation (intack) function supporting nested interrupts in esophageal squamous cell carcinoma. It allows the CPU to acknowledge the occurrence of an interrupt and re-enable higher priority interrupts. Because of the Intack loop from an active state, a higher priority ESCC interrupt or other higher priority device can interrupt the CPU. When an ESCC responds to an input signal from the CPU, it can place an interrupt vector on the data bus. This vector is written in WR2 and can be read in RR2. In the interrupt response time, ESCC can modify 3 bits in this vector to indicate the status. If the vector is read in channel A, state is not included. If reading in channel B, the status is included.
The six interrupt sources in ESCC (transmit, receive and external/status two channels) have 3 bits associated with the interrupt source as follows:
1. Interrupt pending (IP)
2. service interruption (ius)
3. Interrupt Enable (IE)
If the IE bit is set for a given interrupt source, then that source can request an interrupt.
However, when the Master Interrupt Enable (MIE) bit in WR9 is reset, no interrupt can be requested. The IE bit is write-only. The other two bits are related to the interrupt priority chain (see Figure 7 on page 13). ESCC can request an interrupt only if there is none.
A higher priority device is requesting an interrupt (ie, when the IEI is higher). If the device requests an interrupt in question, it pulls down the int. The CPU then responds with an stack, and the interrupt device places a vector on the data bus.
ESCC Interrupt Prioritization Plan
ESCC can also perform an interrupt acknowledgement loop using software. It is sometimes difficult to create the Intack signal with the necessary time to acknowledge the interrupt and allow nested interrupts. In this case, the interrupt can be confirmed to issue a software command to the ESCC. For more information, the Z80230/Z85230/L Enhanced Function Interrupt Pending (IP) bit indicates that interrupt servicing is required. When an IP bit is 1, the IEI input is high and the int output is low, requesting an interrupt. In ESCC, if the IE bit is not set, the source's IP is never set. IP bits are read in RR3A. An interrupt under the service (IUS) bit indicates that the interrupt request has been serviced. If IUS is set to 1, all low priority ESCC and ESCC external interrupt sources will be blocked from requesting interrupts. Internal interrupt sources are internally daisy-chained by state disabled, while low-priority devices are set low for subsequent peripherals. During the interrupt acknowledgement loop, if no higher priority device requests an interrupt. There are three types of interrupts, as follows:
1. transmission
2. take over
3. External/Status Each interrupt type is enabled under program control, with channel A taking precedence over channel B and prioritizing transmit, receive, and external/status interrupts.
Arrange in this order within each channel. When the transfer interrupt is enabled (WR1 bit 1 is 1), the occurrence of the interrupt depends on the state of WR7' bit 5. If WR7' bit 5 is 0, the top byte of the first-in, first-out (FIFO) becomes empty when transmitted. If WR7' bit 5 is 1, the CPU is interrupted when the transmit FIFO is completely empty. When the data in the transmit FIFO is loaded into the transmit shift register, the transmit FIFO becomes completely empty. This condition means that at least one character must be written to send to the TX FIFO, making it empty.
When the receiver is enabled, the CPU interrupts in one of three ways:
1. First received character or special receive condition interrupt
2. Interrupt all received characters or special receive conditions
3. Interrupt only on special receive conditions If WR7' bit 3 is 1 and special receive conditions are selected, a receive character occurs when four bytes are available in the receive FIFO. This is most useful in synchronous applications because the data is in contiguous bytes. Interrupt on first character or special condition and interrupt on special condition are usually associated with block transfer mode. Special reception conditions consist of one of the following:
• Receiver overflow • Framing errors in asynchronous mode • EOF in SDLC mode
• Parity error (optional) special receive condition interrupt is different from normal receive character interrupt is only available for the state in the vector during the interrupt acknowledgement cycle. In a receive interrupt in the first character or special condition mode, a special receive condition interrupt occurs anytime after the first received character. interrupt. The main function of the external/status interrupt is to monitor the CTS, DCD and sync pins. However, external/status interrupts are also caused by either:
• Transmission underrun condition • Zero count in BRG • Interrupt detection (asynchronous mode)
• Suspend (SDLC mode)
• End of Polling (EOP) Sequence in Data Stream (SDLC Cycling Mode) Interrupts caused by an abort or EOP sequence have a special feature that allows ESCC to interrupt when an abort or EOP sequence is detected or terminated. This feature facilitates proper termination of the current message, proper initialization of the next message, and precise timing of abort conditional modes through external logic in the SDLC. SDLC loop mode allows secondary stations to identify the primary station and regain control of the loop during the polling sequence.
CPU/DMA block transfer
ESCC provides block transfer mode to accommodate the CPU/DMA controller. Block transfer mode combines the wait/request output with the wait/request bit in WR1. Wait/request output can be defined as line in CPU block transfer mode or as request line transfer mode in DMA block.
For a DMA controller, the ESCC request output indicates that the ESCC is ready to transfer data to or from memory. For the CPU, the wait line indicates that the ESCC is not ready to transfer data, so the CPU is requested to extend the I/O cycle.
The DTR/Request line allows full duplex operation under DMA control. ESAP can be programmed to wait/request pin as if WR7' bit 4 is 1.
ESCC data communication capability
ESCC provides two independent full-duplex programmable channels that can be used for any universal asynchronous or synchronous data communication protocol, these channels have the same characteristics and functions.
Asynchronous Mode ESCC is a significant improvement over the standard Serial Communication Controller (SCC). The addition of deeper data FIFOs provides greater protection against underruns and overflows and more efficient use of bus bandwidth. Deeper data can access the FIFOs regardless of the protocol used and do not need to enable them. For information on these improvements, see the Z80230/Z85230/L Enhanced Transmit and Receive on page 22 allowing 5 to 8 bits per character, plus optional even or odd parity. This transmitter can provide 1, 1.5 or 2 stop bits per character and can provide interrupt indication. The receiver interrupt detection logic interrupts the CPU received interrupts at the beginning and end. Reception is protected from spikes by delayed start bit verification.
Signal for a period of time, equal to processing 1 bit of data after a low level is detected on the receive data input (RxDA or RxDB pin). If the low level is not persistent (ie temporary), the character assembly process is not persistently started.
Framing errors and overrun errors are detected and buffered with characters at . They will happen. Vectored interrupts allow fast handling of error conditions. Additionally, a built-in checking process avoids interpreting framing errors as new beginnings. bits. Framing errors result in a delay of plus half the time. Need to process 1-bit data start when searching for next start bit. Transmit and receive clocks can be selected from any of several sources. In asynchronous mode, the sync pin can be programmed as an input with an interrupt.
ability.
Sync mode
ESCC supports byte-oriented and bit-oriented synchronous communication. Synchronous byte-oriented protocols are handled in several modes. They use 6-bit or 8-bit sync characters (single sync) or
12-bit or 16-bit sync mode (bisync), or with external sync signal. Remove leading sync characters without interrupting the CPU.
A 5-bit or 7-bit sync character is detected from an 8-bit or 16-bit pattern in ESCC by overlapping the larger pattern between multiple incoming sync characters
Synchronous byte-oriented mode CRC checking is delayed by one character time so that the CPU can disable CRC checking for specific characters. This action allows protocols such as ibm-bisync to be implemented.
Polynomial support for both CRC-16 (x16+x15+x2+1) and CRC-CCITT (x16+x12+x5+1) error checking. Any polynomial can be selected in all synchronization modes. You can preset the CRC generator and checker to all 1s or all 0s. ESCC also provides a function to automatically transmit CRC data when no other data is available for transmission. This feature enables high-speed transfers under DMA control without CPU intervention for message end. Sync mode when there is no data or CRC to transmit, the transmitter inserts 6, 8, 12 or 16 bit sync characters regardless of the programmed character length.
SDLC mode
ESCC supports synchronous bit-oriented protocols such as SDLC and High-Level Data Link Control (HDLC) by performing automatic flag transmission, zero insertion and CRC generation. A special command is used to abort a frame being transmitted. At the end of the message, when the transmitter runs under load. The transmitter can also be programmed to send idle lines consisting of consecutive flag characters or stable flag conditions. If a transfer underrun occurs in the middle of a message, an external/status interrupt alerts the CPU to this state change so that an abort command can be issued. ESCAP can also be programmed to release the CPU for tasks in the event of an underload. The last character of the frame can be from 1 to 8 bits, allowing frames of any length to be received.
The preamble flag for the receiver to automatically synchronize the frame in SDLC or HDLC.
And provide a sync signal on the sync pin (also programmable interrupts). The receiver can search for frames addressed by 1 byte or 4 bits within a byte. User-specified address or global broadcast address. Frames also do not match ignoring user-selected addresses or broadcast addresses.
The number of address bytes is expanded under software control. To receive data, interrupts can be selected on the first received character, on each character, or only in special cases (EOF). The receiver automatically deletes the sender during character assembly. CRC is also calculated and automatically checked to verify frame transmission. At the end of the transfer, the received status frame is available in the status register. In SDLC mode, ESCC must be programmed to use the CRC-CCITT polynomial, but the generator and checker can be pre-set to all 1s or all 0s. The CRC data is inverted before transmission and the receiver according to the bit pattern 0001110100001111.
NRZ, NRZI or FM encoding can be used in any 1X mode. The parity options available in asynchronous mode are also available in synchronous mode. However, parity checks are generally not used for SDLC because CRC checks are more reliable.
SDLC loop mode
ESCC supports SDLC loop mode and normal SDLC. In SDLC loop mode, the primary controller station manages message traffic and any number of secondary stations on the loop. In SDLC loop mode, the ESCC performs the functions of a secondary station. ESCC operation in regular SDLC mode can act as a controller to select SDLC loop mode by setting WR10 bit 1 to 1.
Controller Secondary 1 Secondary 4
Secondary 2 Secondary 3
SDLC loop mode
A secondary station in SDLC loop mode always monitors the loop of transmitted messages and passes these messages to the rest of the loop, resending them with a one-bit time delay. Auxiliary stations are only available in certain eras. The controller indicates that the secondary station can send a message by sending a special character called EOP around the loop. The eop character has a bit pattern of 11111110, the same pattern as the abort character in normal HDLC. This bit pattern is unique and easy to identify because there is no insertion in the message.
When a secondary station has a message to send and recognizes an EOP on the line, it changes the last binary 1 of the EOP to a 0 before transmitting. This action will change the EOP entry flag sequence. The secondary station now puts its message on the loop and terminates the message with EOP. The same procedure is used by any secondary station to append its message to the message of the first secondary station to be transmitted at the other end of the loop. Secondary station incoming messages without any information only transmits echoes. All secondary stations are prohibited from cycling, except when EOP is recognized. In SDLC loop mode, NRZ, NRZI or FM encoding can be used.
SDLC Status FIFO
The ESCC's ability to receive high-speed back-to-back SDLC frames is maximized as a 10-bit deep 19-bit wide status FIFO buffer. When enabled (bit 2 is 1 via WR15), the memory area allows the DMA to continue transferring data to memory for the CPU to check for messages later. For each SDLC frame, 14 counter bits and 5 status/error bits are stored. Byte count and status bits are used by reading registers RR6 and RR7. RR6 and RR7 are only used when SDLC FIFO buffering is enabled. The 10 x 19 status FIFO buffer is separated from the 8-byte receive data FIFO buffer.
Each channel in the Baud Rate Generator ESCC contains a programmable BRG. Each generator produces a square wave output from two 8-bit registers that form a 16-bit time constant, 16-bit down counter and flip-flop. At startup, the flip-flop at the output is set high, the value in the time constant register is loaded into the counter, and the countdown begins. When the BRG reaches zero, the output switches, the counter is reloaded with the time constant, and the process repeats. The time constant can be changed at any time, but the new value will not take effect until the counter is loaded again.
The output of the BRG can be used as a transmit clock, a receive clock, or both. This output can also drive the DPLL. For more information, see Digital Phase Locked Loop. If the receive clock or transmit clock is not programmed to come from the TRXC pin, the output of the BRG can be looped back from the TRXC pin. The following formula relates the time constant to the baud rate. PCLK or RTXC is the clock input to the BRG. The clock mode is 1, 16, 32 or 64, as in wr 4 bits 6 and .
PCLK or RTXC frequency time constant = 2 (baud rate) (clock mode) - 2 digital phase locked loop escc contains a dpll, encoded with nrzi or fm. The DPLL is driven by a nominally 32 (nrzi) or 16 (fm) clock. Multiply by the data rate. The DPLL uses this clock and data stream to construct the data clock. This clock is then used as the ESCC receive clock, transmit clock, or both. When the DPLL is selected as the transmit clock source, it provides a jitter-free clock output. The clock output is a divisor of the DPLL input frequency divided by the appropriate chosen encoding technique.
For nrzi encoding, dpll calculates 32x the clock to create the nominal bit time. As a 32x clock count, the DPLL searches for edges (1 to 0 or 0 to 1) of the incoming data stream. When a transition is detected, the DPLL makes a count adjustment (on the next count cycle), resulting in a terminal count near the center of the bit cell.
For FM encoding, dpll counts from 0 to 32, but its period corresponds to 2-bit time. When the DPLL is locked, clock edges in the data stream occur at counts 15 and 16, between counts 31 and 0. The DPLL only transitions at times centered around 15 to 16 counts. The 32x clock to the DPLL can be programmed to either come from the RTXC input or the output of the BRG. The DPLL output is programmed to go through the TRXC pin if it is not used as an input.
Data encoding Data encoding allows transmission on the same clock and data information etc. This capability saves the need to transmit clock and data on separate media.
Synchronizing data is often required. ESCC offers four different data encoding methods, selected by bits 6 and 5 in WR10. Any encoding method is used in any X1 mode of ESCC, asynchronous or synchronous. The selected data encoding is active even if the transmitter or receiver is idling or disabled.
Table 3. Data Encoding Instructions (continued)
Code type level value fm1 (biphase mark) Additional transition in the center of bit cell 1 No extra transition in the center of bit 0 in cell fm0 (a biphase A transition space occurs at the beginning of every bit 0 call. 0 is represented by an additional transition at the center of the bit cell.
Indicates the center of the bit cell with no additional transition at 1.
In addition to these four methods, ESCC can also be used to decode Manchester (biphase level) data using the DPLL in FM mode and to program the receiver for NRZ data. Manchester encoding always produces a transition at the center of the bit cell. If the transition is 0 to 1, the bit is 0. Bit is 1 if converted to 1 to 0.
Auto-echo and local loopback
ESCC can automatically echo all information it receives. This feature is mainly useful in asynchronous mode, but works in synchronous and SDLC. The same goes for patterns. Auto echo mode (txd to rxd) is used with nrzi or fm encoding. There is an additional delay since the data stream is not decoded before being retransmitted. In auto-echo mode, the CTS input is ignored and enabled as a transmitter, (although transitions of this input may cause an interrupt if programmed to do so). In this mode, the transmitter is actually bypassed and the programmer is responsible for disabling the transmitter.
Interrupt and wait/request on send. ESCC is also capable of local loopback. In this mode, internal transmit data is bound to internal receive data and RxD is ignored. CTS and DCD inputs are also ignored when transmit and receive are enabled. However, transitions of these inputs can cause interruptions. The local loopback operates in asynchronous, synchronous and SDLC modes and NRZ, NRZI or FM encoding the data stream.
Z80230/Z85230/L Enhanced
The difference between Z80230/Z85230/L ESCC and standard SCC is detailed as follows
ESCC has a 4-byte transmit buffer with programmable interrupts and DMA requests. Level. There is no need to enable the FIFO buffer as it is always available. You can set the transmit buffer empty (tbe) interrupt and dma request to send commands to be generated when the top byte of the transmit FIFO is empty or only when the FIFO is empty. Completely empty. A hardware or channel reset clears the transmit shift register, flushes the transmit FIFO, and sets WR7' bit 5 to
The FIFO is empty (WR7' bit 5 is 0), the system allows longer data response time requests without underflow. The Interrupt Service Routine (ISR) writes 1 byte and then tests RR0 bit 2. DMA requests transferred in this mode are set to 0 after each data. When the top byte of the FIFO is empty, the rr0 bit 2 of write (ie tbe) is set to 1. WR7' bit 5 is reset to.
In applications where interrupt frequency is important, the transmit ISR can be optimized by programming the ESCC only when the FIFO is completely empty (WR7' bit 5 is 1), and writing 4 bytes to fill the FIFO. When WR7' bit 5 is 1, only one DMA request is generated, filling the bottom of the FIFO. However, this may be beneficial for applications that may reinsert DMA requests and is not necessary. When the top byte of the FIFO is 1, the tbe status bit rr0 bit 2 is set to 1. null. WR7' bit 5 is set after a hardware or channel reset
The ESCC has an 8-byte receive FIFO with programmable interrupt levels. There is no need to enable the 8-byte FIFO as it is always available. A hardware or channel reset clears the receive shift register and flushes the receive FIFO. Receive character available interrupt is generated by WR7' bit 3 selection. Receive character available bit, RR0 bit 0 is set to 1 (independent WR7' bit 3) when at least one byte is available at the top of the FIFO.
The DMA request on receive (if enabled) is on the receive FIFO regardless of bit 3 of WR7'. The wait/request pin becomes inactive if the number of bytes available in the FIFO exceeds 1, and becomes active when the FIFO is emptied.
By resetting WR7' bit 3 to 0, applications with long latency to interrupts can generate a request to read data from the FIFO when a byte is available. The application can then test the available bits of the received character to determine if more data is available. By setting WR7' bit 3 to 0, the ESCC can issue an interrupt when the receive FIFO is halfway. Full (4 bytes available), allowing for reduced interrupt frequency. If WR7' bit 3 is when 4 bytes are available, a receive character available interrupt is generated.
If the ISR reads 4 bytes per routine, the frequency of interrupts is reduced. If WR7' bit 3 is 1, receive all characters interrupt, after special condition is enabled, when four characters are available. However, when a character with a special condition is detected, an interrupt is generated when the character is loaded into the first four bytes of the FIFO. Therefore, the special condition ISR must be that RR1 has a special condition before reading the data to determine which byte. Write register 7 prime (wr7') A new register WR7 has been added to ESCC to enable 6 new features.
1. WR15 bit 0 must be reset to 0 to address the sync character in register WR7. If bit 6 WR7' is set to 1, then WR7' is read by performing a read loop on RR14. The WR7' function remains enabled until specifically disabled or reset by hardware or software. drill
5 is set to 1, all other bits are reset to 0 after reset. For applications using the ZiLog Z8x30SCC or Z80230, these two device types can be identified in the software by the following tests:
1. Write 01H to write to register 15
2. read register 15
If bit 0 is set to 0, the device is a Z8x30SCC. If bit 0 is set to 1, it is Z80C30. If the device is a Z8XC30, WR15 needs to be written before continuing. If the device is a Z80230, all writes to address 7 will be written to WR7' until WR15 is set to 0. The WR7 register bits are described as follows: Bit 7 (not used) This bit must always be 0. Bit 6 (Extended Read Enable) Setting this bit to 1 can be done by issuing commands to read rr9 (wr3) rr4, rr5, rr14 (wr7') and rr11 (wr10) respectively. Bit 5 (Transmit FIFO Interrupt Level) If this bit is set to 1, a TBE interrupt will be generated when the transmit FIFO is completely complete. null. If this bit is set to 0, a TBE interrupt will be generated when the top byte of the transmit FIFO is empty. This bit is set after a hardware or channel reset. In a DMA request in transfer mode, when using w/req or dtr/req pin, if WR7' bit 5 is set, the request is asserted when the TX FIFO is completely empty.
If bit 5 is reset, the request is asserted when the top byte of the FIFO is empty. Bit 4 (DTR/REQ Timing) If this bit is set to 1 and the DTR/REQ pin is used in request mode (WR14 bit 2 is 1), the DTR/REQ pin is disabled the same as the W/REQ pin, as shown in.
DMA Request for Transfer Disable Timing Bit 3 (Receive FIFO Interrupt Level) This bit sets the receive FIFO interrupt level. If this bit is set to 1, receive data When the receive FIFO is half full (4 bytes available), the available bit is asserted. If this bit is reset to 0, the request to receive data is available interrupt when all bytes are set. For more information, see 8-Byte Receive FIFO on page 22. Bit 2 (Auto RTS pin de-assertion) This bit controls when the RTS pin is de-asserted in SDLC mode. If this bit is 1 and WR5 bit 1 is set to 0 during the transfer of the SDLC frame, the de-assertion of the RTS pin is delayed until the last bit of the shutdown flag clears the txd pin. The RTS pin is pulled high from the last bit of the shutdown flag on the rising edge of the transmit clock cycle. This action means that the ESCC must be programmed for the underrun flag. (WR10 bit 2 is 0), the RTS pin for the end of the frame is de-asserted. This function is effectively independent of the programmed transmitter idle state. In synchronous mode, other than SDLC, the RTS pin immediately follows the state programmed by bit 1 of WR5. when? WR7' bit 2 is set to 0 and the RTS follows the state of WR5 bit 1. Bit 1 (Auto EOM reset)
If this bit is 1, the ESCC automatically resets the Tx underrun/EOM latch and preset sends the CRC generator to its programmed preset state (according to WR5 bit 2 and WR10 bit 7). Therefore, there is no need to issue a reset Tx underrun/EOM latch. Command when this feature is enabled. Bit 0 (SDLC flag sent automatically)
If this bit is 1, ESCC automatically transmits the SDLC flag before transmitting data. This operation removes the requirement to reset the flag free bit (WR10 bit 3) before writing. data transmitter.
Historically, the SCC has locked the data bus on the falling edge of wr. However, many
The CPU does not guarantee that the data bus is valid when the wr pin goes low, Zilog modified the data bus timing to allow a maximum delay of 20 ns from the wr signal. Activates the latch low to the data bus.
CRC reception in SDLC mode In SDLC mode, the entire CRC is clocked into the receive FIFO. ESCC is done clocking in the CRC to allow retransmissions or manipulation software. In SCC,
When the close flag is recognized, the contents of the receive shift register are immediately transferred to the receive FIFO, resulting in the loss of the last two bits of the CRC. In ESCC, this function does not need to be programmed. When the close flag is detected, the last 2 bits of the CRC are transferred to the receive FIFO. In all other sync modes, ESCC is not in the last 2 CRC bits (same as SCC).
When marked as idle, txd in sdlc encoded with NRZI is forced high When ESCC is programmed in SDLC mode with NRZI data encoding and marked idle (WR10 bit 6 is 0, bit 5 is 1, bit 3 is 1), when The transmitter enters the marked idle state. There are several different ways for the transmitter to enter the idle state. In each of the following cases, when the marked idle state is reached:
• Data, CRC, Mark and Idle • Data, Mark and Idle • Data, Abort (underrun) and Idle • Data, Abort (Command) and Idle • Idle Mark and Idle Mark Command when mark idle bit is set to 0 , the forced high function is disabled. This feature is used in conjunction with the automatic SDLC open flag transmission feature, WR7' bit 0 is 1, to ensure that the packet is properly formatted. In this case, the CPU does not need to issue any commands. If WR7' bit 0 is 0, as on SCC, the flag idle bit (WR10 bit 3) is set to 1 to enable flag transmission before SDLC packet transmission. Improved Transmit Interrupt Handling ESCC locks TBE interrupts due to CRC being loaded into transmit shift.
Register even if the tbe interrupt was not reset due to the last data byte. the end of A
DPLL counter Tx clock source When DPLL is selected as the transmit clock source, the DPLL counter output is
The DPLL source clock is divided by the appropriate divisor format for the programming data encoding. In FM mode (FM0 or FM1), the DPLL counter output signal is the input frequency. Divide by 16. In NRZI mode, the DPLL counter output signal is the input clock period divided by 32. This feature provides a jitter-free output signal instead of the DPLL transmit clock output as the transmit clock source. This action does not affect the use of dpll as the receive clock source.
DPLL clock input DPLL DPLL output to receiver
DPLL counter DPLL output to transmitter input frequency divided by 16 (fm0 or fm1) nrzi input clock period divided by 32
DPLL output locks read register 0 state during read cycle During a read operation, the contents of read register 0, rr0 are locked. ESCC prevents the contents of RR0 from being changed during read operations. However, SCC allows reading rr0 twice to change the state of rr0 when the register is read. The contents of RR0 are updated after the rising edge of the RD signal.
Software Interrupt Acknowledgment The Z80230/Z85230/L interrupt acknowledgement loop can be initiated using software. If a write to register 9 (WR9 bit 5 is 1) and a read to register 2 (RR2) cause an interrupt input loop, software acknowledgement will cause the INT pin to go high. The IEO pin goes low. Interrupts under service (IUS) latches are set as the highest priority pending interrupts. When a hardware input signal is required, the software acknowledgement cycle requires resetting the highest IUS command issued in the ISR. If rr2 is read from channel A, an unmodified vector is returned. If rr2 is read from channel B, the modified vector indicates the source of the interrupt. Vectors include states (vis) and vectorless. (nv) When WR9 bit 5 is set to 1, the bits in WR9 are ignored. If the Intack and IEI pins are not used, pull them up to VCC (2.2K, typical) through a resistor.
Fast SDLC Transfer Data Interrupt Response To facilitate the transfer of back-to-back SDLC frames using a single shared flag Between frames, ESCC allows data from a second frame to be written to the transfer
FIFO after Tx underrun/EOM interrupt occurs. This feature allows application software more time to write data to the transmitter, while allowing the current frame to end with a CRC and a flag. The SCC requires that no data be written to the transmitter until a TBE interrupt is generated after the CRC has completed the transfer.
If data is written to the transmit FIFO after a transmit underrun/EOM interrupt but before a TBE interrupt is issued, the automatic EOM reset feature is enabled. (WR7' bit 1 is 1). Therefore, commands to reset the Tx/Underrun EOM latch and reset must not use the Tx CRC generator.
SDLC FIFO Frame Status Enhancements When used with a DMA controller, the ESCC SDLC Frame Status FIFO enhancements maximize the ESCC's ability to receive high-speed back-to-back SDLC messages. It minimizes frame overflows due to CPU delays in responding to interrupts. Features (shown in Figure 15 on page 29) include:
• 10-bit deep and 19-bit wide status FIFO
• 14-bit receive byte counter • Control logic
The 10 x 19-bit status FIFO is separated from the 8-byte receive data FIFO. When the enhancements are enabled, read the status in register 1 (rr1) and the byte count of the SDLC frame is stored in a 10-x 19-bit status FIFO. This operation allows DMA
Controller, receive frame before CPU verification
notes:
1. All sent bypass mux, equal to the contents of the scc status register.
2. The parity bit bypasses the MUX and is equal to the contents of the SCC status register.
3. EOF is set to 1 whenever reading from the FIFO. To summarize the operation: data is received, assembled and loaded into an 8-byte FIFO before being transferred to memory via the DMA controller.
When a flag is received at the end of the SDLC frame, the 14-bit frame byte count counter and 5 status bits are loaded into the status FIFO, which is verified by the CPU. This CRC check routine is automatically reset in preparation for the next frame, which starts immediately. Because the byte count and state of each frame are saved, message integrity can be verified later. Status information is stored up to 10 frames before the status FIFO overflow occurs. If the frame is terminated with the abort command, the byte count and status will be loaded into the status FIFO and the counter will be reset for the next frame.
FIFO Enable/Disable This FIFO buffer is enabled when WR15 bit 2 is 1 and ESCC is in SDLC/HDLC. model. Otherwise, the status register contents will bypass the FIFO and be transferred directly to the bus interface (disabled or via channel or power-on reset). ESCC is backward compatible with NMOS Z8030/Z8530 when FIFO mode is disabled. FIFO mode is disabled on power-up (WR15 bit 2 is set to 0 on reset). The effect of backward compatibility on the register set is that rr4 is an image of rr0, rr5 is an image of rr1, rr6 is an image of rr2, rr7RR3. See Reading Registers on page 53 for information on adding registers. The status FIFO enable signal is read at bit 2 of RR15. The bit is set to 1 if the FIFO is enabled; otherwise it is reset to 0.
FIFO read operation When WR15 bit 2 is 1 and the FIFO is not empty, the next read status register RR1 or additional registers rr7 and rr6 read the FIFO. Reading the status register rr1 results in an empty FIFO location, so read the status after reading the byte count; otherwise the count is incorrect. It is disabled until the FIFO underflows. In this case, the multiplexer switches to enable state reading directly from the status register. In this state, slave RR7 and RR6 are undefined RR7 bit (FIFO data available) Status data comes from the FIFO or directly from the status register because it is set to 1 when the FIFO is not present. empty.
Since all status bits are not stored in the FIFO, all transmit, parity and EOF bits bypass FIFA. The status bits sent through the FIFO are the three remaining bits, the overflow bit, and the CRC error.
The correct order for polling byte count and FIFO logic is rr7, rr6, then rr1. (Optional to read RR6). Additional logic prevents the FIFO from reading through multiple slaves RR1. Read lock FIFO empty/full status bit (bit 6) from RR7 and boot status multiplexer to read ESCC megacell instead of status FIFO
SDLC status FIFO anti-lock function is only conditional (WR1 bit 4 = bit 3 = 1) when the frame status FIFO is enabled and ESCC is programmed for special reception, when the character reads eof status. When the eof state is at the top of the fifo, an interrupt with a vector is generated for receiving data. Must end at the ISR, regardless of whether an interrupt acknowledgement cycle (hardware or software) has been executed. This operation allows the DMA to complete the transfer of the received frame to memory, and then interrupts the CPU that completes the frame without locking the FIFO. Because the receive interrupt mode under special conditions does not use the receive data interrupt vector, it indicates that the last byte of the frame has been read. Receive FIFO. Reading frame status (CRC, byte count and stored in status FIFO) determines that EOF is not required. When a character is received with a non-EOF special receive condition (receiver overflow or parity), the character is read from the FIFO and the receive FIFO is locked until an error reset command is issued.
programming
The ESCC contains write registers in each channel programmed by the system. Configure the function of each channel individually. In the Z85230/L ESCC, by
D/C pins. In addition to WR0 and RR0, programming a write register requires two writes, while reading a read register requires a write and a read. The first letter is written to WR0 and contains bits that point to the selected register. If the next operation is to write to the selected write register. If the next operation is a read, read the selected read register. The pointer bit is automatically cleared after the second operation, so a read or write comes from rr0 or goes to wr0. There is no need to write 00 to WR0 to access WR0 or RR0. For the Z80230 ESCC, the registers are directly addressable. The command to WR0B determines how the ESCC decodes at the beginning of a read or write cycle. In right shift mode, selects A/B channel. The states from AD0 and AD5 are ignored. In left shift mode, channel selection A/B is taken from AD5, and AD0 state is ignored. AD7 and AD6 are always ignored as the address bits and the register address itself occupies AD4–AD1. The initializing software first issues a series of commands to initialize the basic mode of operation. These commands are followed by other commands to qualify the selected mode. For example, in asynchronous mode, character length, clock first set rate, stop bits, and parity. Next, the interrupt mode is set. Finally, the receiver and transmitter are enabled. write register
ESCC contains 16 write registers in each channel (17 counts the transmit buffer). These write registers are programmed to configure the function of the channel. There are two registers (WR2 and WR9) shared by the two channels, any one of them can be passed. WR2 contains interrupt vectors for both channels. WR9 contains interrupt control bits and reset commands. Register WR7' is 1 if WR15 bit can be written.
Z80X20 register access
The bits are decoded to form the register address. This bit is placed in this register to simplify programming when the current state of the right/left shift is unknown. A hardware reset forces the address to be decoded from it into left-shift mode. AD5–AD0. In right-shift mode, addresses are decoded from AD4–AD0. The shift uses commands to write the right/left shift bits, making software writing WR0 independent of the state of the right/left shift bits. In left shift mode, register addresses are placed in AD4–AD0 and channel select bits A/B, decoded from AD5. In right-shift mode, register addresses are again placed on AD4–AD1, but channel select A/B is decoded from AD0. Since the Z80230 does not contain 16 read registers, the decoding of the read registers is not complete; this state is registered in parentheses in Tables 4 and 5 on page 23. These addresses can also be used to access read registers. The Z80230 contains only one WR2 and WR9; these registers can be written to from either channel. Left shift mode is used when channels A and B are programmed differently. Using shift-left mode allows software to sort through a channel's registers. once. When the channels are programmed the same, the right shift mode is used. By increasing the address, you can program the same data value into both channel A. and Channel B registers. The Z80230 registers are addressed using the address on AD7–AD0, which is addressed by the rising edge of AS. SHIFT RIGHT/SHIFT LEFT bit control in channel B WR0