09.07.2015 Views

mitsubishi - Al Kossow's Bitsavers

mitsubishi - Al Kossow's Bitsavers

mitsubishi - Al Kossow's Bitsavers

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

MITSUBISHI MICROCOMPUTERSMELPS 8-48 MICROCOMPUTERSFUNCTION OF MELPS 8-48 MICROCOMPUTERSI/O PORTSThe MELPS 8-48 has three 8-bi~ ports, which are calleddata bus, port 1 and port 2.Port 1 and Port 2Ports 1 and 2 and both 8-bit ports with identical properties.The output data of these ports are retained and do notchange until another output is loaded into them. Whenused as inputs the input data is not retained so the inputsignals must be maintained until an input instruction isexecuted and completed.Ports 1 and 2 so-called quasi-bidirectional ports havea special circuit configuration to accomplish this. Thespecial circuit is shown in Fig. 8. <strong>Al</strong>l terminals of ports1 and 2 can be used for input or output.CPUINTERNALBUSRESETWRITEPULSEFig. 8 I/O ports 1 and 2 circuitInternal on chip pull-up resistors are . provided for allthe ports. Through the use of pull-up resistors, TTL standardhigh-level or low-level signals can be supplied. Thereforeeach terminal can be used for both input and output. Toshorten switching time from low-level to high-level, when 1sare output, a device of about 5kn or lower is inserted fora short time (about 500ns when using a 6MHz crystal oscillator).A port used for input must output all 1 s before it readsthe data from the input terminal. After resetting, a port isset to an input port and remains in this state, therefore itis not necessary to output all 1 s if it is to be used for input.In short a port being used for output must output 1 s beforeit can be used for input.The individual terminals of quasi-bidirectional portscan be used for input or output. Therefore some terminalscan be in the input mode while the remaining terminalsof a port are in the output mode. This capability of ports1 and 2 is convenient for inputting or outputting 1-bit ordata with few bits. The logical instructions ANL and ORLcan easily be used to manipulate the input or output ofthese ports.Data Bus (Port 0)The data bus is an 8-bit bidirectional port, which is usedwith I/O strobed signals. When the data bus is used foroutput the output data is latched, but if it is used for inputthe data is not latched. Unlike ports 1 and 2, which canhave individual terminals in the input or output mode, allterminals of the data bus are in the input or output mode.When the data bus is used as a static port the OUTL instructioncan be used to output data and the I NS instructionto input data. Strobe pulse RD is generated while theINS instruction is being executed or WR while OUTL is.being executed.The data bus read/write using MOVX instructions, butthen the data bus is a bidirectional port. To write into thedata bus a WR signal is generated and the data is vaiid whenWR goes high. When reading from the data bus, an RD signalis generated. The input levels must be maintained untilRD goes high. When the data bus is not reading/writing, itis in the high-impedance state.CONDITIONAL JUMPS USING TERMINALS To.Tl and INTConditional jump instructions are used to alter programdepending on internal and external conditions (states).Details of the jump instructions for the MELPS 8-48 canbe found in the section on machine instructions.The input signal status of To, T 1 and I NT can be checkedby the conditional jump. instructions. These inputterminals, through conditional jump instructions such asJTO and JNTO, can be used to control a program. Programsand processing time can be reduced by being ableto test data in input terminal rather than reading the datainto a register and then testing it in the register.Terminal To, Tl and INT have other functions and usesthat are not related to conditional jump instructions. Thedetails of these other functions and uses can be found inthe section on terminal functions.II• MITSUBISHI.... ELECTRIC4-9

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!