In this topic we introduce the pic16F84 mcu


Fig. 4.1 An example of a system based on a microcontroller



Yüklə 475,74 Kb.
səhifə5/8
tarix11.05.2023
ölçüsü475,74 Kb.
#111822
1   2   3   4   5   6   7   8
The PIC16F84 Microcontroller Part 1

Fig. 4.1 An example of a system based on a microcontroller.
In terms of architecture, referring back to Figs. 3.1 and 3.2 and 44 respectively, the microprocessor is the central processor unit, whereas the microcontroller is the complete functioning computer-like system. As an example, consider the electronics of a car odometer monitoring system displaying total distance since manufacture and also a trip odometer. The main system input signal is a tachometer generating pulses on each rotation of the engine flywheel, which when totalized gives the number of engine revolutions – and the pulse to pulse duration could also give the road speed. Of course the actual road distance depends on the gearing of the engine, and thus we need to know which of the five gear ratios has been chosen by the driver at any time. This is shown as five lines G1.. ,G5 originating from the gear box. One signal will be high for the appropriate forward gear, with neutral and reverse being ignored. Additional inputs are used to give a manufacturer’s option of a mile or kilometer display, and a user input to reset the trip display to zero.
The display itself consists of seven 7-segment digits to indicate up to (optimistically) gggggg.g. As there are so many segments to control (49 in total), Fig. 4.1 shows the display data fed via a single digital line, shunted serially into a shift register – see Fig. 2.20. A second line provides clock pulses for the register with 49 clock pulses being needed to refresh the display.15
The trip odometer display comprises four digits, which will record up to ggg.g. Similarly two output lines are used to feed and clock the shift register, and 28 clock pulses are needed to shift in a new 4-digit trip display.
The resource budget (list of subsystem functions) for this system is:
• An edge-triggered input for the tachometer pulse train, connected to a counter/timer to totalize engine revolutions.
• Seven static digital input lines to interface to the gear ratio, mi/km option and trip reset.
• Four output digital lines to clock the two shift registers and provide segment data.
• A microprocessor to do the calculations and to read/write to the input/ output ports respectively.
• Program memory, usually ROM of some kind.
• Data memory for temporary storage of program variables, usually static RAM.
• Non-volatile storage for physical variables, such as total distance and distance since trip reset.
This functionality could be implemented onto a single integrated circuit, and in this situation would be known as a microcontroller, that is a microprocessor integrated with its support circuitry giving a complete microcomputer function. Of course the resource budget listed above is specific to our example. Although the core functions (microprocessor and memory) are common to a wide range of applications, the input/output (I/O) interface needs to be tailored to the task in hand. Some typical I/O functions are:
• I/O to interface to a serial bit stream of various synchronous and asynchronous protocols.
• Counter/timer functions to totalize input events and to generate precision time-varying digital output signals.
• Analog to digital multiplex/conversion to be able to read and digitize analog inputs.
• Digital to analog conversion to output analog signals.
• Display ports to drive multi-digit liquid crystal displays.
This alternative approach to using additional silicon resources led to the first MCUs in the late 1970s. For example the 35,000 transistor Motorola 6801, designed in response to a specific application from an car manufacturer, used the existing 6800 MPU as a core, with 2048 bytes of ROM program memory, 128 bytes of data RAM, 29 I/O lines and a 16bit timer. With the viability of the MCU approach vindicated, a range of families, each based on a specific core but with individual family members having a different selection of I/O facilities, was introduced by the leading MPU manufacturers. For example, the Motorola 68HC11 family (a development of the 6801 MCU) uses a slightly enhanced 6800 core. The 68HC12 and 68HC16 families use 16-bit cores but are designed to be upwardly compatible with the 8-bit 68HC11. It was quickly realised that many embedded applications did not even need the power of the (antique) 6800 core, and the 68HC05 family16 had a severely reduced core by lower price. Actually 4-bit MCUs outsold all other kinds of processor until the early 1990s and 8-bit MCUs, now the most popular, are likely to continue in this role for the foreseeable future.

Yüklə 475,74 Kb.

Dostları ilə paylaş:
1   2   3   4   5   6   7   8




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©azkurs.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin