Processor Architecture
Unit - 1PIC microcontroller architecture Q 1) Explain microcontrollers.A 1)A microcontroller is a compact integrated circuit designed to govern a specific operation in an embedded system. A typical microcontroller includes a processor, memory and input/output (I/O) peripherals on a single chip. A microcontroller is a computer present in a single integrated circuit which is dedicated to perform one task and execute one specific application. It accepts the command and gives output. For example, a TV remote contains a microcontroller chip that takes input of the buttons we press like changing channels and gives the output by changing the channel. It contains memory, programmable input/output peripherals as well a processor. Microcontrollers are mostly designed for embedded applications and are heavily used in automatically controlled electronic devices such as cellphones, cameras, microwave ovens, washing machines, etc. For example, Intel 8031 and 8051 are 8 bits microcontroller. 16-bit microcontroller − This type of microcontroller is used to perform arithmetic and logical operations where higher accuracy and performance is required. Types of Microcontroller 8 bit Microcontroller 16 bit Microcontroller 32 bit Microcontroller Embedded Microcontroller External memory Microcontroller Q 2) What is microprocessor?A 2)A microprocessor is a controlling unit of a micro-computer wrapped inside a small chip. It performs Arithmetic Logical Unit (ALU) operations and communicates with the other devices connected with it. It is a single Integrated Circuit in which several functions are combined. Microprocessor is the heart of Computer system. It is only a processor, so memory and I/O components need to be connected externally. Memory and I/O has to be connected externally, so the circuit becomes large. You can't use it in compact systems. Cost of the entire system is high. Due to external components, the total power consumption is high. Therefore, it is not ideal for the devices running on stored power like batteries. Most of the microprocessors do not have power saving features. It is mainly used in personal computers. Microprocessor has a smaller number of registers, so more operations are memory-based. Microprocessors are based on Von Neumann model. It is a central processing unit on a single silicon-based integrated chip. It has no RAM, ROM, Input-Output units, timers, and other peripherals on the chip. It uses an external bus to interface to RAM, ROM, and other peripherals. Microprocessor-based systems can run at a very high speed because of the technology involved. It's used for general purpose applications that allow you to handle loads of data. It's complex and expensive, with a large number of instructions to process. Q 3. Explain the architecture of PIC18FXXXA 3) Fig.1. PIC18Fxxx Architecture PIC Microcontroller architecture is based on Harvard architecture and supports RISC architecture (Reduced Instruction Set Computer). PIC microcontroller architecture consists of memory organization (ram, rom, stack), CPU, timers, counter, ADC, DAC, serial communication, CCP module and I/O ports. PIC microcontroller also supports the protocols like CAN, SPI, UART for interfacing with other peripherals. The CPU is at the centre of the diagram and consists of an 8-bit ALU, an 8-bit working accumulator register (WREG), and an 8 8 hardware multiplier. The higher byte and the lower byte of a multiplication are stored in two 8-bit registers called PRODH and PRODL respectively. The program counter and program memory are shown in the upper left portion of the diagram. Program memory addresses consist of 21 bits, capable of accessing 2Mbytes of program memory locations. The PIC18F452 has only 32Kbytes of program memory, which requires only 15 bits. The remaining 6 address bits are redundant and not used. A table pointer provides access to tables and to the data stored in program memory. The program memory contains a 31-level stack which is normally used to store the interrupt and subroutine return addresses. Q 4) Explain program memory.A 4) Program memory is a non-volatile memory.All modern PIC processors use a Flash memory technology that allows the program memory to be reprogrammed using a simple hardware interface. It is common to include some kind of programming connector on even a production product to allow for firmware updates if needed The original 8051 Microcontroller by Intel has 4KB of internal ROM. Some variants of 8051 like the 8031 and 8032 series doesn’t have any internal ROM (Program Memory) and must be interfaced with external Program Memory with instructions loaded in it . Almost all modern 8051 Microcontrollers, like 8052 Series, have 8KB of Internal Program Memory (ROM) in the form of Flash Memory (ROM) and provide the option of reprogramming the memory. ROM is used for permanent saving program being executed, and it is divided into two sections, Boot Program section and the Application Program section. These two sections can have different level of protection since they have different sets of Lock bits. It is normally possible to store constants - i.e. initialized variables that you do not change - in the program memory. data memory is a place used to store your variables and use them later for setting or getting the values. it is non-volatile, but can be reprogrammed. All the PIC chips have a configuration bit that can be used to read-protect the program memory so the device programmer can no longer read the memory. When coding in a language like c or c++ you can interact with your memory in a more low level way. One of the most common problem is accessing a memory that has already been free. This is a memory that you’ve either released with free , or memory that your program has automatically released, for example from the stack. Memory is divided in a multiple segments- stack and heap. Stack- Stack memory has a set of ways and operation for its work. Heap- The heap is often used to allocate big amounts of memory that are supposed to exist as a long as the developer wants. Q 5) Explain data memory.A 5)The Data Memory or RAM of the 8051 Microcontroller stores temporary data and intermediate results that are generated and used during the normal operation of the microcontroller. Almost all modern variants of 8051 Microcontroller have 256B of RAM. In this 256B, the first 128B i.e. memory addresses from 00H to 7FH is divided in to Working Registers (organized as Register Banks), Bit – Addressable Area and General Purpose RAM (also known as Scratchpad area). In the first 128B of RAM (from 00H to 7FH), the first 32B i.e. memory from addresses 00H to 1FH consists of 32 Working Registers that are organized as four banks with 8 Registers in each Bank. The data space that is used for temporarily storing constant and variable values that are used by the microcontroller during normal program execution. Data memory serves for storing and keeping data required for the proper operation of the program depending on the programming progress ,it can, but does not have to , be split into two sections for DSP2 instruction set to data memory is a considered to consist of two sections. The two data spaces are accessed by using two address generation unit and separate data paths , i.e. two data can read or writt3en simultaneously. Structure of the data memory of the dsPCIC30F4013 and dsPIC30F6014A device. Then size of the data memory similarly to the program memory depends on the model on dsPIC device for dsPIC30F4013 device data memory has 64k. The addresses are 16bit i.e.no more4 than 64k addresses can be generated all data memory addresses are even. An attempt to access an odd address will result device reset. The first 2k locations are reserved for the SFR an general purposes. These register contain the control and status bits of the device. This division is essential only for DSP instruction. This access to the memory speed up cosiderly the execution of DSP instruction which have been optimised for signal processing ,which most of the time requires calculation of the sum of products. This requires fast reading of both operands to be multiple and the result added to the previous value. The size of the data memory similarly to the program memory depends on the model of dsPIC device. Q 6) Explain Reset operation.A 6)The NWK layer, upon request of the next higher layer, will perform a reset operation. The loop repeats endlessly, unless the reset is operated. The reset operation is not represented in the flowchart, because it is an interrupt, and therefore may occur at any time within the loop. The self-reset operation is discussed in section 9.6. Here, we will have a look at reporting information about the fault. The SYSRESETREQ feature might also be used by the debugger after a debug connection is established, after flash programming is carried out and when user specified a target reset operation. Clean and fast power-up and down slope are provided to the microcontroller to guarantee reliable Power on Reset operation. If necessary, add an external voltage supervisor. The NWK layer first resets the MAC layer. The reset request comes from the APL layer in the form of NLMERESET.request. A device performs the NWK layer reset after the initial powerup, before attempting to join, and after leaving a network. A device performs the NWK layer reset after the initial powerup, before attempting to join, and after leaving a network. 16-bit MCUs and DSCs have a Reset Control register (RCON). When a reset occurs, RCON is updated to indicate the source of the reset. In addition to reporting reset conditions, RCON also contains information on the WDT and some power-saving modes. RCON can be examined by an application's start-up code to see why a device entered reset. Q 7) Explain brownout reset.A 7)A brownout reset is a circuit that causes a computer processor to reset (or reboot) in the event of a brownout, which is a significant drop in the power supply output voltage. Without a brownout reset circuit or an uninterruptible power supply (UPS) that maintains the full normal operating voltage for the processor when a brownout occurs, a processor can malfunction or lock up. In some cases, if a processor receives an abnormally low voltage and continues to operate anyway, it will produce nonsensical output. Brownouts can occur for brief intervals or over extended periods. They commonly occur on utility lines at times of exceptional power demand, such as during heat waves or after natural disasters. In a computer, a brownout can also occur as a result of a problem with the internal power supply that converts the AC utility power to the DC used by a computer's internal electronic components. Q 8) Explain watchdog timer.A 8)A watchdog timer (WDT) is a hardware timer that automatically generates a system reset if the main program neglects to periodically service it. It is often used to automatically reset an embedded device that hangs because of a software or hardware fault. PIC18F2420/2520/4420/4520 devices offer a total of seven operating modes for more efficient power management. These modes provide a variety of options for selective power conservation in applications where resources may be limited (i.e., battery-powered devices). There are three categories of power-managed modes: Run modes Idle modes Sleep mode These categories define which portions of the device are clocked and sometimes, what speed. The Run and Idle modes may use any of the three available clock sources (primary, secondary or internal oscillator block); the Sleep mode does not use a clock source. The power-managed modes include several power saving features offered on previous PIC devices. One is the clock switching feature, offered in other PIC18 devices, allowing the controller to use the Timer1 oscillator in place of the primary oscillator. Also included is the Sleep mode, offered by all PIC devices, where all device clocks are stopped. Q 9) Explain power down modes and its configurations.A 9)Switching from one power-managed mode to another begins by loading the OSCCON register. The SCS<1:0> bits select the clock source and determine which Run or Idle mode is to be used. Changing these bits causes an immediate switch to the new clock source, assuming that it is running. The switch may also be subject to clock transition delays. These are discussed in “Clock Transitions and Status Indicators” and subsequent sections. Entry to the power-managed Idle or Sleep modes is triggered by the execution of a SLEEP instruction. The actual mode that results depends on the status of the IDLEN bit. Depending on the current mode and the mode being switched to, a change to a power-managed mode does not always require setting all of these bits. Many transitions may be done by changing the oscillator select bits, or changing the IDLEN bit, prior to issuing a SLEEP instruction. If the IDLEN bit is already configured correctly, it may only be necessary to perform a SLEEP instruction to switch to the desired mode. Q 10) Write about the history of Microcontroller.A 10)The microcontroller is an embedded computer chip that controls most of the electronic gadgets and appliances people use on a daily basis, right from washing machines to anti-lock brakes in cars. It was during 1970 and 1971 , Gary Boone designed a single integrated circuit chip that could hold nearly all the essential circuits to form a calculator; only the display and the keypad were not incorporated. One of the first applications of microcontrollers was in gas pumps. The Microprocessors ability to control other electronic equipment like Photocopiers is realized. The emphasis here is not on the computational power of the Microprocessor but rather on a control mechanism with less complex hardware and increased reliability. Business at the Texas Instruments at MOS department was mostly a custom business wherein companies like a desktop calculator manufacturers came to TI with a set of specific requirements. TI converted those specifications to a chip set normally four, five or six chips to execute or implement the specification for popular companies like canon, Olympia and Olivetti. For these companies, it was really amazing that TI provided this ultimate service of compressing so many units on to just four or five or six chips because the previously used technology called the TTL would use hundred to two hundred chips. No wonder the business was doing great. A common rule at Texas was “one riot, one ranger” which means “one chip, one engineer.” So, Texas Instruments that had about twenty MOS design engineers deployed three or four of these at one project at a time. And, it took about six months to complete one project. Therefore, business capacity was the number of engineers divided by the number of chips, once in every six months. Though the requirements of these projects differed in terms of detail, the major principle and the overall function was quite identical. So, the engineers were really tired of doing these monotonous projects. Boone and the other engineers ended up thinking of a matrix of customer needs one way and chunks of circuitry or functional blocks the other way. Boone could find out the commonality and he, along with the others considered simulating the thought, “Okay, now if I had these many bytes of data storage, and I had this many bytes of program storage, and I had these many bits of keyboard scan interface, then that would cover all of the specification I know about, maybe”. As a result of this excellent thought, came the first TMS 100 microcontroller chip. TI offered this microcontroller for sale to the electronics industry in 1974. It was made available in different configurations of RAM and ROM sizes. By 1983, nearly 100 million TMS 1000 had already been sold. Q 11)What are the factors to consider for the selection of microcontrollers.A 11)Power efficiency. Temperature tolerance. Depending on the environment in which your microcontrollers operate, you may want devices that withstand extreme temperature. There will be a trade-off between temperature tolerance and cost. Security. Memory. The amount of memory (RAM and ROM) you need will depend on the programs you will be running. More programs need more random access memory (RAM). In addition, a GPU will require not only more RAM but faster read/write time as well.
- There is a trade-off between processing performance and power consumption: a device with higher processing power will consume more energy.
- Therefore, if your microcontroller is wireless and running on a rechargeable battery, you need to weigh sacrificing power efficiency against getting more processing power, or vice versa.
- Hacking which targets IoT devices is rising, a threat that is especially relevant to microcontrollers used in automobiles.
- In response, microcontroller makers are implementing layers of security such as cryptography and physical security.
- Now, users can purchase microcontrollers that have been certified to the latest security standards or use MCUs with on-chip secure hardware.
0 matching results found