GB2226433A - Microcontroller peripheral expansion bus - Google Patents
Microcontroller peripheral expansion bus Download PDFInfo
- Publication number
- GB2226433A GB2226433A GB8925224A GB8925224A GB2226433A GB 2226433 A GB2226433 A GB 2226433A GB 8925224 A GB8925224 A GB 8925224A GB 8925224 A GB8925224 A GB 8925224A GB 2226433 A GB2226433 A GB 2226433A
- Authority
- GB
- United Kingdom
- Prior art keywords
- microcontroller
- controller
- control
- sfr
- control logic
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/10—Program control for peripheral devices
- G06F13/12—Program control for peripheral devices using hardware independent of the central processor, e.g. channel or peripheral processor
- G06F13/124—Program control for peripheral devices using hardware independent of the central processor, e.g. channel or peripheral processor where hardware is a sequential transfer control unit, e.g. microprocessor, peripheral processor or state-machine
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Microelectronics & Electronic Packaging (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Executing Machine-Instructions (AREA)
- Microcomputers (AREA)
Abstract
A microcontroller with the capability of allowing a user to expand the capabilities of the controller such that the added functionality performs as if the controller were designed with that added functionality onboard. This capability is implemented by providing 71 at the pinouts of the controller access to a special function register area 25 onboard the controller, as well as certain internal control signals. Each peripheral controller which is desired to be interfaced with the microcontroller must have a special address decoding block added. Thus, a microcontroller can be customized to a user's specifications without the costs associated with a custom designed chip. <IMAGE>
Description
MI#OCX)NmOI1#R PERIPSIERAL EXPANSION BUS BACKGRO#1ND OF THE INVEN'TIOIs 1. Field Of The Invention
This invention relates to the field of single chip microprocessors and controllers. In particular, this invention relates to circuitry which brings certain internal signals of a controller to the user interface to allow a user to customize the controller for use with peripheral devices without the expertise of custom layout and device/circuit engineers.
2. Prior Art
Single chip microcontrollers having onboard functionality usually performed by peripheral controllers are well known devices. A representative controller sold by Intel Corporation having such onboard functionality is known as an 8051 microcontroller which incorporates a serial channel which provides input/output for serial devices. In the 8051 controller, a special function register (SFR) area is provided which is used by the software to "talk" to the outside world. Although not part of a standard 8051 controller, other frequently desired functionality includes analog-digital and digital-analog converters as well as various special purpose controllers.While it is possible in the prior art to provide such additional functionality by allocating one or more of the onboard ports as an address and data bus, since not all controller instructions can address the data and address bus normally used to interface with peripheral devices, additional programming is necessary which necessarily slows down input/output, requires additional memory space and generally results in poorer performance. For example, in an 8051 microcontroller, only 4 out of 76 instructions, and none of the bit manipulation instructions, can directly access a peripheral device controller attached to a port.
SUMMARY OF THE INVENTION
A microcontroller is disclosed having the capability of allowing a user to expand the capabilities of the controller such that the added functionality performs as if the controller were designed with that added functionality onboard. The invented controller implements this capability by providing at the pinouts of the controller access to the SF-Rs as well as certain internal control signals. While each peripheral controller which is desired to be interfaced with the microcontroller must have a special address decoding block added, the benefits made available by the invention far outweigh the additional costs associated with adding a special decoding block to a peripheral controller. For example, whether a peripheral controller is onboard or external to the microcontroller will be totally transparent to a user.Additionally, since there is no one set of functionality which is useful to all users, it is impossible to design a chip which includes onboard all possible desired functionalities at an acceptable cost. By the present invention, a user can tailor a microcontroller to his specifications without the costs associated with a custom designed chip.
BRIEF DESCRIPTION OF THE DRAWINGS
Figure 1 is a block diagram showing the main elements of a single chip microprocessor
Figure 2 is a block diagram showing an implementation of SFR buffer control block 71.
Figure 3 is a block diagram showing the SFRB of the present invention.
Figure 4 is a table showing the SFR area.
DETAILED DESCRI#TION OF THE INWENTION A method and apparatus is disclosed for implementing in a single chip microcontroller. Specific numbers of bytes, bits, registers, addresses, clock signals, control signals, etc. have been set forth for purposes of explanation in order to provide a thorough understanding of the invention. However, it should be apparent to one skilled in the art that the present invention may be practiced without these specific details. In other instances, well known circuits and devices are shown in block diagram form in order not to obscure the present invention unnecessarily.
In order to simplify the understanding of the invention, rather than describing the invention in abstract terms, many of the descriptions herein are in terms of a specific processor, namely the Intel 8051 microcontroller, as specified in a publication entitled "Microcontroller Handbook," Order No. 210918-004 available from Intel
Corporation, Santa Clara, California. However, it should be understood that the invention is not limited for use by any specific processor.
Referring now to Figure 1, the main components of a microprocessor with three onboard ports is shown. The microprocessor comprises an arithmetic/logical unit (ALU) 11, a system bus 15, an instruction register (IR) 17, timing and control logic 21, special function register (SFR) area 25, latch registers 27, 31, 33 and input buffers/output drivers 27', 31', 33' corresponding respectively to ports PO, P2, and P3.Also shown are accumulator (ACC) 39, RAM address register 41, random access memory (RAM) 43, additional registers B 45,
Templ 47, and Temp2 49, program counter (PC) 51, PC incrementer 52,
ROM 53, program memory address register 55, program status word (PSW) register 57, buffer 59, stack pointer 61 and data memory pointer (DTPR) 63, all of which are well known in the art and usually needed for proper operation of a single chip microprocessor or controller. The particular manner in which these elements are coupled to each other and operate, as well as additional components, depends upon the particular architecture utilized, which details will be described herein only to the extent necessary for a complete understanding of the invention.
Coupled to ports PO and P2 through an 8 bit bus there may be an external program memory and an external data memory. Timing and control signals for the two external memories are generated through port P3. The program memory contains processor instructions of the usual type. Data to be manipulated by the microprocessor is stored in the data memory. Details regarding the accessing and loading of instructions from the program memory and manipulating data in the data memory are well known in the art and therefore, except to the extent necessary for a proper understanding of the subject invention, will not be described.
Figure 1 differs from a prior art microcontroller mainly by the addition of SFR buffer logic control block 71 which reads and writes the eight address signals SAD0-SAD7 and generates the eight control/clock signals SALE, SPBSL, SPOC, SRDL, SWRL, SPH2S, STIES, and SPH2. In
Figure 1, SFR buffer logic control block 71 includes buffers 75 and SFR control logic 79. In this connection, the inputs and outputs of SFR buffer logic control block 71 utilize the pinouts that would otherwise be used by port 1. However, SFR buffer logic control block 71 could have its own pinouts if port 1 is needed, but of course a different packaging would be needed with 16 additional pinouts to accommodate the inputs and outputs of SFR buffer logic control block 71.
Although not part of the invention, the following discussion of 8051 microarchitecture is provided so that the invention may be better understood.
The 8051 clock is internally divided to generate two nonoverlapping phases. One phase is equal to one external clock cycle. Two phases, called Phl and Ph2, constitute a "State". One state is equal to two external clocks. Six states make a "Cycle". The states, within a cycle, are numbered from 1 to 6; i.e. S1, S2.. S6. The cycles are numbered from 1 to 4; i.e. C1, C2, C3, C4. Instructions execute in integer multiples of cycles. Most of the instructions take one or two cycles to execute.
Timing and control logic 21 of the CPU accesses SFR registers as follows. The 8 bit address of a SFR register 25 is specified in the second byte of an instruction. This byte is available on internal bus 15 during
Ph2 of S4. Control logic 21 asserts a signal IB%ARS indicating that the address matches that of one of the SFR registers. This information is stored for the duration of the instruction execution. In the next state, SS, control logic 21 asserts a read signal RD. The contents of the addressed SFR register is placed on internal bus 15, for storage into one of the temporary registers 47 and 49 of ALU 11. In the following state,
S6, ALU 11 performs an arithmeticllogical operation on the data and places the results on internal bus 15. This modified data is latched into the addressed SFR register.
In short, the address of a SFR is made available in S4. The selected register is read in S5. And finally the data is written into the
SFR in S6. In the case of two cycle instructions, the same steps are followed, but in different cycles.
The Intel 8051 family of microcontrollers allows up to 128 SFR registers which are used as internal control and status registers, although only a few are used. The onboard I/O ports P0, P1, if present,
P2 and P3 are addressed through this register space. The instructions which read, write, read-modify-write, and bit manipulate the SFRs, belong to the SFR space.
Referring now to Figure 2, the various signals generated and utilized by SFR buffer logic control block 71 will be described.
SFR buffer logic control block 71 allows the SFR registers 25 to "talk" to peripheral devices designed to be interfaced with the invented device over a SFR bus (SFRB) which includes the address and data signals SADOSAD7, the control signals SWRL, SALE, SDRL, SPOC and
SPBSL, and the clock signals SPH2, SPH2S and SSlES generated by SFR control block 71, each of which will now be described.
The SFRB is a synchronous bus which allows peripheral cells external to the controller to be accessed through the onboard SFRs.
SAD0-5AD7 is a static bus used for address and data which is driven by the controller when it is sending information to a peripheral cell address and which is driven by the peripheral cell when it is sending information to the controller.
SWRL is an active low signal and transfers the contents of SADO
SAD7 to the data register of the peripheral cell during S6, or during S4 for bit addressable instructions. SWRL corresponds to the controller's internal address write (WR) signal which is designated lB%AR.
SALE is an active high signal which indicates that the SAD0-SAD7 contain a valid address of a peripheral cell. SALE occurs during S4 and
S1. Of course, each peripheral cell coupled to the SFRB should have a unique address and an address decoder as described below. SALE corresponds to the controller's internal address latch enable (ALE) signal which is designated IB%ARS.
SDRL is an active low signal and transfers the contents of the data register of the peripheral cell which was addressed when SALE was asserted. SDRL occurs during S5. SDRL corresponds to the controller's internal read (RD) signal which is designated AR%IB.
SPOC is an active high signal generated by the controller and is used to set all internal registers of the addressed peripheral cell to a known state. SPOC corresponds to the controller's internal reset (POC) signal.
SPBSL is an active low signal corresponding to the controller's port buffer select signal (PBSL). This signal is active during instructions which read the latch of an VO port rather than the port's input pins.
That is, referring to figure 1, when SPBSL is asserted, data which is in one of latches 27, 31 or 33 is read, modified by the accumulator and then written back to the latch. Such instructions are usually bit manipulation instructions
SPH2 corresponds to the controller's internal PH2 signal and is used to synchronize the peripheral cells to the controller clock. It is also used by the peripheral cells as part of their internal two phase clocking scheme.
SPH2S corresponds to the controller's internal phase 2 sleep clock
PH2S. It is used to synchronize peripheral cells which are to be active during the IDLE mode of the controller and as part of their internal two phase clocking scheme.
STIES corresponds to the controller's internal state 1 early sleep signal. It begins during state 6, phase 2 (S6P2) which is the last state of an instruction, and lasts until SIP1. This signal is active during the IDLE mode of the controller. All other timing states that a peripheral cell may require can be generated from SS1ES.
SFR buffer logic control block 71 may be implemented by buffers 75 and SFR control logic 79. In this connection, buffers 75, which are a set of tri-stateable, bi-directional buffers, take the internal controller data and address signals on bus 15 which are to be output, and generate signals appropriate to be placed on the pinouts, or, when receiving signals from a peripheral cell, take the signals on SAD0-SAD7 and place them on~ bus 15.
SFR control logic 79 may be implemented as a set of non-inverting buffers, take the internal controller control and clock signals which are to be output, and generate signals appropriate to be placed on the pinouts. SFR control logic 79 does not receive any inputs from the peripheral cells.
Referring now to Figure 3, peripheral address decoding block 83 receives the signals SAD0-SAD7 as well as the control and clock signals SWRL, SALE, SDRL, SPOC, SPBSL, SPHZ, SPH2S and SS lES.
The SFR Peripheral Cell Decoding Scheme
The manner in which peripheral address decoding block 83 may be implemented will now be described. Any cell which is directly connected to the SFRB is referred to as an SFR cell or peripheral cell.
The controller accesses these cells by reading/writing their address memory locations in the SFR area. To use these cells, at least one unique memory location must be associated with each cell. Each peripheral cell may contain multiple registers, and each register in the cell will have a different SFR address associated with it.
Peripherals can be placed at most of the available locations within the memory map of the SFR area. If a peripheral holds more than one register, the register with the lowest address will be programmed at one address and the other registers associated with the SFR peripheral cell will be programmed to the addresses following the first register.
When a peripheral cell holds more than one register it is restricted to
XOH, X4H, X8H and 'XCH as valid addresses within the SFR memory map, where X is 0-F hexidecimal.
To make the SFR memory location of these registers programmable, each peripheral cell has 16 signals, each of which will have the corresponding SADO-SAD7 line, VCC, or VSS tied to it, depending on the address the register is to be placed. The pins are called ADO-AD7 and ADBARO-ADBAR7. Each peripheral cell also has a pin called BITADDR which will be tied high if the first register of the block is bit-addressable, otherwise it will be tied low.
if a specific bit of the SFR cell address contains a "1", then the corresponding SADO-SAD7 line should be tied to the corresponding
ADO-AD7 line. If a specific bit of the SFR cell's address contains a "0", then the corresponding SADO-SAD7 line should be tied to the corresponding ADBARO-ADBAR7 line.Once all the SADO-SAD7 lines have been tied to either an ADO-AD7 line or an ADBARO-ADBAR7 line, the AD lines that do not have an input must be tied to VCC and
the AD lines that do not have an input-must be tied to VSS. For
example, if the SFR peripheral cell address were C8H, then the following connections would be made:
SADO- ADBARO SADl-ADBARl SAD2 - ADBAR2
SAD3 - AD3
SAD4 - ADBAR4 SAD5 - ADBAR5
SAD6 - AD6
SAD7 - AD7
ADO, ADI, AD2, AD4 and AD5 - VCC
ADBAR3, ADBAR6 and ADBAR7 - VSS A bit-addressable SFR cell can reside at any location inside a row in the SFR area memory map.The only requirement is that only one bit-addressable peripheral cell is allowed per row, with the rest of the locations for that row being used as non-bit-addressable addresses.
What distinguishes a bit-addressable module from a non-bitaddressable module is the BITADDR pin. For a peripheral cell to be bitaddressable, the BITADDR pin must be tied high.
As an example, a bit-addressable SFR cell is placed at address 0C3H. If bit 5 of the module is to be cleared, then CLR OC5H will do the job. Similarly, if bit 7 is to be set, then SETB OC7H will suffice. No other locations in the same row will be affected since they all will have their
BITADDR's lines tied low.
Figure 4 is the SFR memory map showing what addresses are available for placing peripheral cells. That is, except for the locations which indicated as being in use, all other SFR locations are available for use by peripheral cells.
Claims (5)
1. An integrated circuit microcontroller having an internal bus, an arithmetic logical unit for manipulating data on said internal bus, a special function register area which includes an addressing space for accessing certain registers on board the microcontroller used by the arithmetic logical unit, and timing and control logic for generating timing and control signals necessary for the operation of the microcontroller, said microcontroller comprising::
a) a plurality of buffers means coupled to said internal bus and a corresponding set of input/output pins, said input/output pins for coupling to a peripheral cell, said buffers for transferring address information and data information from said special function register area to said input/output pins, and for transferring address information and data information to said special function register area from said input/output pins;
b) control logic means coupled to said internal bus and to a set of control pins for transferring certain of said internal control and timing signals generated by said timing and control logic to said control pins.
2. The apparatus defined by Claim 1 wherein each of said plurality of buffer means comprises a tri-stateable, bi-directional buffer.
3. The apparatus defined by Claim 1 wherein said control logic means places the signals SWRL, SALE, SDRL, SPOC, SPBSL, SPH2, SPH2S and STIES on said control pins.
4. The apparatus defined by Claim 3 wherein said control logic means comprises a non-inverting buffer for each of said signals SWRL, SALE, SDRL, SPOC, SPBSL, SPH2, SPH2S and SOLES.
5. An integrated circuit microcontroller having an internal bus, an arithnetic logical unit for manipulating data on said internal bus, a special function register area which includes an addressing space for accessing certain registers on board the microcontroller used by the arithmetic logical unit, and timing and control logic for generating timing and control signals necessary for the operation of the microcontroller, substantially as herein before described with reference to the accowrganying drawings.
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US28919888A | 1988-12-23 | 1988-12-23 |
Publications (3)
Publication Number | Publication Date |
---|---|
GB8925224D0 GB8925224D0 (en) | 1989-12-28 |
GB2226433A true GB2226433A (en) | 1990-06-27 |
GB2226433B GB2226433B (en) | 1993-01-27 |
Family
ID=23110467
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
GB8925224A Expired - Fee Related GB2226433B (en) | 1988-12-23 | 1989-11-08 | Microcontroller peripheral expansion bus |
Country Status (4)
Country | Link |
---|---|
JP (1) | JPH02264380A (en) |
GB (1) | GB2226433B (en) |
IE (1) | IE62039B1 (en) |
IL (1) | IL92748A0 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0431641A2 (en) * | 1989-12-07 | 1991-06-12 | Hitachi, Ltd. | Microprocessor and method for setting up its peripheral functions |
EP0488213A2 (en) * | 1990-11-28 | 1992-06-03 | Hitachi, Ltd. | Single-chip microcomputer and logic-in-memory |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB2201269A (en) * | 1987-02-17 | 1988-08-24 | Intel Corp | Direct memory access system for microcontroller |
-
1989
- 1989-11-08 GB GB8925224A patent/GB2226433B/en not_active Expired - Fee Related
- 1989-12-05 IE IE388289A patent/IE62039B1/en not_active IP Right Cessation
- 1989-12-18 IL IL92748A patent/IL92748A0/en not_active IP Right Cessation
- 1989-12-22 JP JP1331446A patent/JPH02264380A/en active Pending
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB2201269A (en) * | 1987-02-17 | 1988-08-24 | Intel Corp | Direct memory access system for microcontroller |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0431641A2 (en) * | 1989-12-07 | 1991-06-12 | Hitachi, Ltd. | Microprocessor and method for setting up its peripheral functions |
EP0431641A3 (en) * | 1989-12-07 | 1992-05-13 | Hitachi, Ltd. | Microprocessor and method for setting up its peripheral functions |
US5307464A (en) * | 1989-12-07 | 1994-04-26 | Hitachi, Ltd. | Microprocessor and method for setting up its peripheral functions |
EP0488213A2 (en) * | 1990-11-28 | 1992-06-03 | Hitachi, Ltd. | Single-chip microcomputer and logic-in-memory |
EP0488213A3 (en) * | 1990-11-28 | 1993-06-30 | Hitachi, Ltd. | Single-chip microcomputer and logic-in-memory |
Also Published As
Publication number | Publication date |
---|---|
IL92748A0 (en) | 1990-09-17 |
GB2226433B (en) | 1993-01-27 |
JPH02264380A (en) | 1990-10-29 |
GB8925224D0 (en) | 1989-12-28 |
IE893882L (en) | 1990-06-23 |
IE62039B1 (en) | 1994-12-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5047922A (en) | Virtual I/O | |
JP5588536B2 (en) | Memory device, system having memory device, and method of operating embedded device | |
US5426769A (en) | System and method for producing input/output expansion for single chip microcomputers | |
US5251304A (en) | Integrated circuit microcontroller with on-chip memory and external bus interface and programmable mechanism for securing the contents of on-chip memory | |
US5860021A (en) | Single chip microcontroller having down-loadable memory organization supporting "shadow" personality, optimized for bi-directional data transfers over a communication channel | |
US4349870A (en) | Microcomputer with programmable multi-function port | |
US20080307154A1 (en) | System and Method for Dual-Ported I2C Flash Memory | |
US5341494A (en) | Memory accessing system with an interface and memory selection unit utilizing write protect and strobe signals | |
JP4226085B2 (en) | Microprocessor and multiprocessor system | |
US5317750A (en) | Microcontroller peripheral expansion bus for access to internal special function registers | |
US5724604A (en) | Data processing system for accessing an external device and method therefor | |
US4460972A (en) | Single chip microcomputer selectively operable in response to instructions stored on the computer chip or in response to instructions stored external to the chip | |
US6622244B1 (en) | Booting from a reprogrammable memory on an unconfigured bus by modifying boot device address | |
US5535349A (en) | Data processing system and method for providing chip selects to peripheral devices | |
US7310717B2 (en) | Data transfer control unit with selectable transfer unit size | |
EP4266185A1 (en) | Microcontroller chip containing multi-protocol communication interface peripheral and operation method therefor | |
EP1164490B1 (en) | Re-configurable memory map for a system on a chip | |
US6058467A (en) | Standard cell, 4-cycle, 8-bit microcontroller | |
GB2226433A (en) | Microcontroller peripheral expansion bus | |
KR960002029B1 (en) | Single chip microcomputer and multifunctional memory | |
EP0020972B1 (en) | Program controlled microprocessing apparatus | |
JPH03668B2 (en) | ||
US5826059A (en) | Microcomputer for emulation | |
KR20010051159A (en) | Data processor and data processing system | |
US5860129A (en) | Data processing system for writing an external device and method therefor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PCNP | Patent ceased through non-payment of renewal fee |
Effective date: 19931108 |