In this topic we introduce the pic16F84 mcu



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

Of the three families, the 14-bit core is a good compromise between low-cost and ease of use. The PIC16F84, which is the baseline exemplar of this topic, is a member of this mid-range family.
From the software point of view all devices with the same core are identical. However, there is a different mix of I/O facilities from the hardware perspective, but with much commonalty. For example, the 16C74 supports an 8-channel analog input port, the PIC16C66 a synchronous serial port and the PIC16F84 a non-volatile data memory. All three devices have similar parallel I/O, timer and interrupt handling facilities.
The architecture of the PIC16F84 is shown in a simplified form in Fig. 4.2. Although initially this looks rather complex, it is little more than the architecture of our BASIC computer of Fig. 3.3 but with interface ports connected to the internal File store data bus. You should revise this material now as background to our discussion. In essence the PIC family is based on a Harvard structure with its separate Program and Data store, and with peripheral interface ports mapped onto the Data file store address space. That is the various ports appear to the software to be in the Data store. In more detail we have: Central Processor Unit.

Fig. 4.2 Architecture of the PIC16F84 microcontroller
As a consequence of the Harvard architecture, the CPU is split between the fetch and execution function, both of which operate in parallel with a minimum of interaction.

Fetch


The fetch section comprises a 13-bit Program Counter (PC) addressing the Program store via the Program address bus, and a two-deep Instruction pipeline through which 14-bit instructions via the Program data bus progress through to the Instruction decoder.
The Program Counter is actually located in the Data file store at location File 2 and is labelled as PCL (Program Counter Low byte) in Fig. 4.6.
This means that it can be accessed and manipulated by the software in the same manner as any other file register. For example, if the contents of the Working register were n, then the instruction addwf 2,f overwrites File 2 (i.e. the PC) with its original value plus n – that is skip forward n places. A practical example is given in Program.

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