Microcontrollers PIC. Review, characteristics, advantages


History of the creation of PIC controllers.

The prototype of the PIC family of controllers with RISC architecture was the peripheral controller (Peripheral Interface Controller - PIC), developed in 1975 by a division of General Instrument Microelectronics Inc to support I/O of a 16-bit processor. Since the controller did not have high data processing requirements, it had a limited set of instructions, and almost all of the instructions in it were executed in one machine cycle. Another feature of the controller is the use of Harvard architecture, based on the separation of buses and memory areas for data and commands.

Later, the General Instrument division spun off into an independent company (Microchip Technology Ltd.), which in the late 1980s developed and manufactured the first models of microcontrollers of the P1C16C5x family. Further development and improvement of controllers followed the path of expanding the composition of peripheral devices and the set of commands, improving technology and improving characteristics. Over the past years, the company has released several PIC families, each of which is constantly updated with new models (versions).

Review of PIC controllers.

Microchip currently produces five families of microcontrollers:

● PIC 16 C 5 X includes low-cost controllers with a minimum set of peripherals:

● R I C12Сххх contains a microcontroller in a miniature 8-pin package with a built-in clock generator and an 8-bit ADC module (for some models);

● R I C16x/7x/8x/9x combines a microcontroller with developed peripherals (timers-counters with capture/comparison options, pulse-width modulators, analog comparators, ADCs, serial interface controllers);

● P IC 17С4х/5хх includes high-performance MCUs with an expanded command system and extensive peripherals. Microcontrollers of this family have a built-in hardware multiplier 8 r 8, which performs the multiplication operation in one machine cycle;

● Р I С18Сххх - a new family with a RISC core optimized for the use of a C compiler and an internal bus frequency of up to 10 MHz.

Consumers are provided with three models of microcontrollers of the PICMicro family with different combinations of characteristics and properties.

Junior models.

These include the 16C5x series MCUs and the 8-pin 12C5xx series MCUs, which implement the lower level of capabilities of the PICMicro family of microcontrollers and are used to create small and simple applications. They execute a subset of commands from older models and are software compatible with them. Younger models played a big role in the development of the PICMicro family. However, limited interrupt handling capabilities, a small amount of available program memory and RAM, a lack of in-system programming and I/O ports with advanced functions, and a reduction in the cost of technology costs were the reasons for the transition to mid-level microcontroller models that were sold at the same (and even lower) prices. price, like MK younger models.

Medium models.

Mid-level models form a complete line of microcontrollers (16Cxx series) with many different functions and are the most widely used. They have the same basic architecture as microcontrollers of lower models, but differ significantly in interrupt handling capabilities.

Older models.

Microcontrollers of older models (17Cxx series) were developed to interact with other digital devices. Therefore, they do not have the ADCs and devices for connecting sensors available in mid-level models. The controllers use 16-bit instructions that can address 128K bytes of program memory and data memory (64K words of 16 bits each). To read/write program memory, the MK uses a modified central processor core, which allows various commands to access all processor registers. This increases the flexibility of microcontrollers and expands their application areas. Junior and mid-range models do not have this capability. In addition, higher-end PICMicro models have multiple interrupt vectors, while mid-range microcontrollers use only one interrupt vector.

Links

  • 16-bit MSP430 • MCS-96 • MCS-296 • PIC24 • MAXQ • Nios • 68HC12 • 68HC16
    32-bit ARM • MIPS • AVR32 • PIC32 • 683XX • M32R • SuperH • Nios II • Am29000 • LatticeMico32 • MPC5xx • PowerQUICC • Parallax Propeller

    Manufacturers Analog Devices • Atmel • Silabs • Freescale • Fujitsu • Holtek • Hynix • Infineon • Intel • Microchip • Maxim • Parallax • NXP Semiconductors • Renesas • Texas Instruments • Toshiba • Ubicom • Zilog • Cypress • Integral • Milander
    Components Register • Processor • SRAM • EEPROM • Flash memory • Crystal • Crystal oscillator • RC oscillator • Case
    Periphery Timer • ADC • DAC • Comparator • PWM controller • Counter • LCD • Temperature sensor • Watchdog Timer
    Interfaces CAN • UART • USB • SPI • I²C • Ethernet • 1-Wire
    FreeRTOS • μClinux • BeRTOS • ChibiOS/RT • eCos • RTEMS • Unison • MicroC/OS-II • Nucleus • Contiki
    Programming JTAG • • Programmer • Assembler • Interrupt • MPLAB • AVR Studio • MCStudio
    This article or section is strictly advertising in nature.
    This does not comply with Wikipedia rules. You can help the project by correcting the text according to Wikipedia's stylistic guidelines.

Characteristics of controllers.

It should be noted that not only microcontrollers of different families have different hardware composition and characteristics, but also models (versions) of the same family. However, what most controller models have in common is:

● RISC architecture (with a two-stage pipeline), ensuring the execution of most processor commands in one machine cycle;

● Harvard architecture (with separate data and program buses), providing simultaneous access to data and program memory;

● CMOS technology providing:

• completely static operating mode, in which stopping the clock generator does not lead to the loss of logical states of internal nodes;

• wide range of supply voltages (2…6 V) and temperatures (–40…+70 °C);

• low power consumption;

● the presence of a timer-counter with a programmable prescaler, a watchdog timer with a built-in R C generator, a real-time timer-counter - TM R 0, a status register - STATUS; indirect addressing register - FSR, etc.

● direct and indirect addressing modes; low power consumption mode.

As an example in table. 6.1.1 shows the MK indicators of average models.

Content

  • 1 8-bit microcontrollers 1.1 8-bit microcontrollers PIC10/12/16 1.1.1 BASELINE family architecture
  • 1.1.2 Architecture of the middle (MID-RANGE) family
  • 1.2 8-bit PIC18 microcontrollers
  • 2 16-bit controllers
      2.1 16-bit microcontrollers PIC24F and PIC24H
  • 2.2 Digital signal processing controllers dsPIC30F and dsPIC33F
  • 3 32-bit microcontrollers
  • 4 Debugging tools
  • 5 See also
  • 6 Notes
  • 7 Links
  • Advantages of controllers.

    The advantages of PIC microcontrollers include:

    ● high performance, which allows the implementation of various devices operating in real time at high speeds (control systems for automobile and electric motors, video games, etc.). In particular, the performance of the P I C16C5x at a clock frequency of 20 MHz is 5 MIPS (Million Instruction Per Second - millions of instructions per second). High productivity is achieved through the use of:

    • RISC processor, most of whose instructions are executed in one machine cycle (jump instructions and table reading operations are executed in two cycles);

    • a two-stage pipeline that combines the execution of the current command with fetching the next command from memory;

    • Harvard architecture, providing simultaneous reading of commands (12, 14 or 16 bits) and data (8 or 1 bit);

    ● low power consumption, which opens up wide opportunities for creating devices powered by batteries, powered by a telephone line, solar batteries (mobile phones, electronic watchmen, etc.). For PIC 17 microcontrollers with a wide range of hardware, the current consumption is:

    • less than 5 mA at 5 V, 4 MHz;

    • 100 µA at 4.5 V, 32 kHz;

    • less than 1 µA at 5 V in standby mode;

    ● powerful development support provided by Microchip.

    As support tools for the application developer, the MPASM assembler and macro assembler, the MPSIM simulator, the integrated debugging system for Windows MPLAB, software, in-circuit and debugging emulators, a universal programmer and a C compiler are provided. In addition, there are libraries for working with fixed and floating point, with serial interface and with an analog-to-digital converter, as well as a large number of documented examples of the use of PIC microcontrollers in various areas with source code. The abundance of developer support tools helps reduce application creation time;

    ● compatibility, manifested in the fact that programs for microcontrollers of the earlier PIC16C5X and PIC16CXX families can be easily transferred to the PIC17CXX device family;

    ● the variety of programming methods used “inside” each PIC family.

    Microchip produces:

    • microcontrollers with ultraviolet erasure, in which the memory can be cleared and the controller reprogrammed using the PRO MATE programmer from Microchip to operate in any mode, for example, in mode using an RC oscillator. These microcontrollers are designed for experimental development and debugging of programs;

    • one-time programmable controllers (One – Time Programming PROM – OTP), manufactured in a plastic case, allow the user to write the program and configuration bits into memory only once. They are used in cases where there is no need to frequently change the content of the program or the configuration of the microcontroller in the manufactured device;

    • controllers programmed by the manufacturer according to the user's order (Quality TP - QTP). This service, offered by Microchip, targets legacy program code;

    • controllers with serial numbers (SQTP), programmed by the manufacturer according to the user's order. In these MCUs, several user-defined cells contain a number unique to the individual device. The serial number can be random, pseudo-random or sequential. It can be used as an access code, password or identifier;

    • mask controllers (ROM), which use mask ROMs. Such controllers, which have a low cost, are manufactured for mass consumers or for large order volumes;

    ● high reliability, low cost, etc.

    Thanks to these advantages, microcontrollers find wide and varied applications.

    Stack

    In processors, the stack is used to store return addresses from subroutines and interrupts, as well as to pass parameters to subroutines and return values. In addition, the stack can be used to temporarily store any necessary information. However, Microchip PIC does not have a full stack. The stack has a fixed size, depending on the family, and is located outside the address space of program memory and data memory.

    Microcontrollers BaseLine

    have a stack two 12-bit words deep, not accessible by software, for storing return addresses from subroutines. The return address is pushed onto the stack when the CALL instruction is executed and is popped from there by the RETLW instruction. Thus, the depth of nested subroutine calls is two. Interrupts are not implemented in these microcontrollers. Some microcontrollers that might be called Enhanced BaseLine, such as the PIC16F570, have a stack of four 12-bit words deep and can handle interrupts. The interrupt return address is pushed onto the stack when the interrupt occurs and is popped with the RETFIE instruction. There are no other differences.

    Mid-range microcontrollers

    They differ from BaseLine only in the stack depth increased to 8 levels and the length of the stored word is 14 bits. In addition, an additional RETURN instruction can pop the return address from the stack. There are no other differences from BaseLine.

    Microcontrollers Enhanced Mid-range

    We got a stack 16 levels deep storing 15-bit return addresses from subroutines and interrupts.
    However, this stack is already available in software. The pointer to the current position on the stack is stored in the lower 4 bits of the STKPTR register, and the contents of the word it points to in the TOSL and TOSH registers. Moreover, in TOSH only the lower 7 bits are used. All three registers are readable and writable, allowing the program to use the stack to store its data. There are no special POP and PUSH instructions; you must manually change the STKPTR register. Attention, when accessing the stack, you need to exclude the possibility of interruptions, or better yet, disable them
    .

    You can also note a kind of single-level stack for saving the STATUS, WREG, BSR, PCLATH, FSR0L, FSR0H, FSR1L and FSR1H registers. Moreover, these saved copies are available programmatically, so, for example, the FSR0L register corresponds to the saved copy of FSR0L_SHAD. Since interrupts cannot be nested, such single-level storage is sufficient.

    Microcontrollers PIC18

    have a similar organization of work with the stack to Enhanced Mid-range.
    Only the stack depth increased to 31 words out of 21 bits. The stack pointer occupies the 5 least significant bits of the STKPTR register, and the signs of stack overflow and exhaustion are also located there. The TOSU register has been added, similar to PCHATHU. POP and PUSH commands have appeared, which simply move STKPTR. Attention, when accessing the stack, you need to exclude the possibility of interruptions, or better yet, disable them
    . The figure below does not show two stack status bits in the STKPTR register.

    There is also a single-level stack for saving registers when an interrupt occurs. However, only the STATUS, WREG and BSR registers are saved. Moreover, saved copies are not programmatically accessible. But it became possible to use this storage when calling subroutines and returning from subroutines. To do this, you need to add the FAST parameter to the call and return instructions. Please note that only one copy of the registers can be saved! Moreover, if an interruption occurs between the call and return, the contents of the registers will be lost!

    Rating
    ( 1 rating, average 4 out of 5 )
    Did you like the article? Share with friends:
    For any suggestions regarding the site: [email protected]
    Для любых предложений по сайту: [email protected]