Wednesday, October 1, 2014

MCS 96 Microcontroller Application and Specifications Explained

MCS
The microprocessor has become an increasingly significant factor in various fields. Advanced integrated circuit technology has enabled a complete system on this device which contains a CPU, program memory, data memory, interrupt controller, serial communication port, TTL I/O and analogue I/O. These ‘on-chip system’ devices are termed as microcontrollers.

The microcontrollers can have additional features and characteristics to suit specific application areas. In effect, we have microcontrollers for digital signal processing, LCD screen control, communication, speech syn- thesis and real-time control. In every field, the microcontrollers have helped users in overcoming old barriers and  perform tasks which were previously considered impossible.

Real-time applications In real time environment the processor performs several tasks simultaneously. Broadly, the tasks can be divided  into two types monitoring and control. For these applications, general purpose microprocessors and micro- controllers are not very efficient. This 5 is because the minimum necessary configuration of the system itself may involve many devices. Consequently, the system tends to be bulky, less reliable and consumes more power.` But what degrades the real time efficiency is the fact that more external bus cycles have to be performed to interact with various devices that are involved in the system.

The obvious solution is to integrate essential resources on one chip and effectively hold them together, so that the totality offered by the new device can have far reaching impact on many real-time applications. Intel Corp has developed some microcontroller families in an attempt to offer totality to real-time application areas. MCS-96 family can be considered as a matured attempt in this direction.

The block diagram As seen from the typical block diagram of MCS—96, a 16-bit microcontroller family, the resources like analogue I/O, digital I/O, special function registers, separate register file, timers, program memory and watch- dog timer etc. are coupled together on one chip. From these basic features itself, things appear to be set for many real-time applications. But, as realised earlier, efficient interaction be- tween the resources is equally important for real-time applications.

After studying the resource management details. we are happy to real- ise that the blocks once programmed can function independently. Some of the blocks can optionally get activated without CPU’s intervention. What is even more impressive is that, some of them store their individual outputs in the private buffer areas. Eventually, CPU is freed from many duties and can pay maximum attention to ‘rea time management".

Now let us take a closer look at some of the blocks individually. 232-byte register tile. This file contains 232 bytes of RAM, which can be accessed as bytes, words or double words. Each of these locations can be used as an ‘accumulator’. These large number of accumulators can be very useful to handle many tasks simultaneously, without spending time in ‘saving’ and ‘unsaving’ them.

By using a portion of this internal RAM area for the stack operations, many external bus cycles may be shortened. This leads to lot of time saving in critical applications.

 The top-most 16 bytes (FO h—FF h) can be preserved under power down conditions, by providing battery backup.

Special function registers. All I/Os on the microcontroller are controlled through these registers. Most of these registers have two functions one of being read from and the other, of being written to. The memory map illustrates this. These registers are accessible as bytes unless specified otherwise. Through these registers, other on chip resources like high speed TFL I/O, 1 watchdog timer, PWM output etc., can be programmed and accessed.

Timers: Two 16-bit timers designated as Timerl and Timer2, are available on the chip. Timer1 is used to synchronise events to real-time, while Timer2 can be clocked externally. Both the timers can be used to generate interrrupts when overflow occurs. High-speed TTL I/O units are coupled to these timers. Baud rate generator can also use the input applied to Timer2.

Watch dog timer is a very special category timer, which can monitor the program being executed by the microcontroller. In case of software upsets, this timer can reset the microcontroller and an error recovery routine can resume the execu- tion gracefully from a suitable point.

Serial port. The serial port provided has three asynchronous and one synchronous modes of operation.The receiver is double buffered and the port is functionally compatible with the serial port on MCS-51 family of microcontrollers. The port is supported by an independent baud rate generator. The asynchronous modes of the port operate in full duplex.

High speed input unit (HSI). This is a functionally independent unit which can record the time at which an event has occurred with respect to Timer1. There are four such input lines, which can be individually programmed to record specific events. This unit can identify four types of events eight positive transitions, each positive transition, each negative transition and every transition.

Whcn HSI cvcnt occurs, an 8.x 20 FIFO stores thc 16 bits of Timcrl and 4 bits indicating thc actual event. The unit can take eight such events and hold them in the FIFO. One more event can be held in the holding register. The unit can generate interrupts in three ways two depend on the FIFO status and one depends on transition on HSLO pin.

If similar transitions have to be monitored with general purpose ` microprocessors or microcontrollers, no other activity can be comfortably performed simultaneously.

High speed output unit (HSO). This unit outputs TTL levels at the specified event with minimum CPU overhead. The recognised events include start of A/D conversion and resetting Timer2.

HSO unit has content addressable memory (CAM) at the centre of the control. There are eight CAM registers of 23 bits each. Thus, each CAM register contains 16-bit time at which action is to be carried out. The remaining 7 bits specify reference with the nature of action.

One CAM register is compared with timer values every state time, taking eight state times to compare all CAM registers with the timers. When the referred timer value matches, action is taken as specified by the other 7 bits. This action does not need CPU’s intervention. Thus, HSO lines can generate ITL waveforms effectively. By suitably signal conditioning the HSO pulses, three phase control and even analogue control outputs can be obtained. HSO units can be programmed to generate interrupts at preset times. When this unit is programmed, on reset of Timer2 or start of A/D conversion, it can trigger interrupt.

 Analogue interface. The microcontroller can be easily interfaced to analogue signals using ADC, PWM output and HSO unit. Analogue inputs are accepted through 8-channel multiplexer and given to the 10-bit A to D converter. Some members of MCS-96 family have on-chip sample and hold. The exact conversion time of ADC depends on CPU’s operating frequency and the family part number. Conversion time of the ADCs vary between 42 to 22 microseconds.

Analogue conversion can be started by software trigger or by an HSO unit. The ADC command register is double buffered hence it is possible to write a command to start conversion by the HSO, while one is still in progress. The two byte result of the conversion also p contains the input channel number.

Digital to analogue conversion can be done with pulse width modulation (PWM) output. The PWM unit has 8- bit counter which is incremented every state time. PWM output goes high when the counter is zero; it goes low when PWM register equals the counter value. The PWM and HSO units provide digital signals which can be filtered for use as analogue outputs.

Interrupt control. There are 21 different sources of interrupt, but there are only eight interrupt vectors. Interrupt pending register indicates interrupt waiting, whereas interrupt mask register is used to enable or disable the interrupts. The priority encoder looks at all the ‘pending and enabled’ interrupts and selects the one with highest priority.

Block diagram overview. It can be easily noticed from above that the blocks once programmed are tailored to work independently. Moreover, the blocks are coupled together, so that they can ‘trigger’ each other without the CPU’s knowledge. Important features are bufferred. This reduces critical areas and data losses while handling multiple  tasks. This microcontroller family stands out with respect to its wait state generation logic. The maximum allowable wait states can be programmed. After the maximum specified delay, the microcontroller does not wait longer even if ‘Ready’ line is not released. Thus, the CPU does not get ‘ tied down’ to any faulty or slower peripheral device.

Chip configuration byte is an important programmable resource of this family. Apart from the on chip EPROM security, it also controls the bus width and determines the maxi- mum wait states allowed.

Instruction set

The MSC-96 instruction set con- tains a full set of arithmetic and logical operations for 8-bit and 16-bit data. It also supports 16 by 16 multiply, 32 by 16 divides and 32-bit compare.

The powerful instruction set has six addressing modes, with some instrutions having two to three operands. In indexed address modes, by adding 8 or 16-bit displacement, effective address of an operand can be formed. This allows fast access to arrays stored any- where in the memory. Stack-relative addressing, which is easy to program, is often used for recursive—subroutine parameter passing and dynamically allocated variables.

The set includes 16 varieties of conditional jump, allowing signed and unsigned comparisons. All of 2028 bits in register space can be tested by jump on bit set/bit clear instructions. A decrement and jump on not zero instruction provides efficient loop control. Most of the instructions ar executed in about 0.8 microseconds. The longest instruction takes eight microseconds because jumps and calls are PC-relative and the code is easy to relocate. The instruction set is complemented by a variety of I/O subsystems for handling virtually any computer peripheral or industrial application.

MCS-96 family overview

At every stage of development of this family, better versions of the basic microcontroller were released. Now we have many members to this family varying in additional instructions, re- sources, performance levels and pack- ages. The situation becomes slightly complex as these parameters are inter- dependent. Therefore, while selecting the device one needs to be extremely careful. Once the proper choice is made, a very cost effective product can be designed.

The initial member like 8097-90 does not have sample and hold. But the next enhanced version, 8097BH incorporates the feature. Again, both the above mentioned family members have shortcomings like more power consumption even in power down mode, up/down counting is not possible, sharing of interrupt vectors etc. Many of these problems have been overcome in versions like 80Cl96, and the process is being continued with the recent announcement of 80C198.

Applications of MCS-96 family

 Many elegant products can be designed using MCS-96 family microcontroller. In fact, the family members with on chip EPROM would be ideal s for many applications, as only external signal conditioning circuitry will be 1 . needed. With prudent features like · analogue I/O, high speed TTL I/O and watchdog timer lot of barriers can be crossed. Intel Corp has published many application notes to demonstrate the capabilities of this family.

Industrial applications.

The MCS- 96 family members can comfortably meet demands of industrial applications especially, in the fields of motion control, single loop controller, intelligent transducer and three phase control. The family members can be useful in increasing performance of existing designs based on MCS-Sl i family.

For example, in motion control area , the optical encoder interface can be interfaced to HSI lines. The motor p can be controlled with PWM output or HSO. For analogue feedback purposes, analogue inputs of the device  For example, in motion control area , the optical encoder interface can be interfaced to HSI lines. The motor can be controlled with PWM output or HSO. For analogue feedback purposes, analogue inputs of the device can be used.

Instrumentation and control.

The analogue signal capturing feature along with a number of crunching capabilities of the family would prove to be of great importance in this field. In the laboratory, one can capture liquid or gas chromatographic signals and even analyse them. On the other hand, the microcontroller can also play an important role in designing compact guidance and control systems for missiles and torpedoes.

Medium range front end data acquisition could be yet another area well suited for this family. The front end system can communicate with the main l computer with the help of an on-chip serial port. Though many essential resources are integrated on the chip, additional devices can be easily hooked on to MCS -96 family microcontrollers. Designs of intelligent instruments with GPIB interface can be made efficient using these microcontrollers.

Data processing

This 16-bit microcontroller family . has sufficient processing power to perform tasks previously performed by special computers. It can be used for digital signal processing, matrix manipulation and other intense processing oriented tasks.

This versatile microcontroller family is rapidly becoming popular. Latest modems, colour photo copiers, automotive ignition and transmission controls are using suitable members of the family. Thus, the family appears to have a promising future.

In India, microcontrollers are comparitively not very popular for various reasons. Many systems are still being designed using MCS-85 family devices. This is mainly due to the lack of development support available indigenously. But the situation seems to be changing. Couple of leading manufacturers in India are believed to be actively involved in building development support for the MCS-96 family.

No comments:

Post a Comment