07_ PIC16F778 Overview (families and standards ) .pptx
Belal90
13 views
22 slides
Aug 20, 2024
Slide 1 of 22
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
About This Presentation
The original name of this microcontroller is PICmicro (Peripheral Interface Controller), but it is better known as PIC. Its ancestor, called the PIC1650, was designed in 1975 by General Instruments. It was meant for totally different purposes. Around ten years later, this circuit was transformed int...
The original name of this microcontroller is PICmicro (Peripheral Interface Controller), but it is better known as PIC. Its ancestor, called the PIC1650, was designed in 1975 by General Instruments. It was meant for totally different purposes. Around ten years later, this circuit was transformed into a real PIC microcontroller by adding EEPROM memory. Today, Microchip Technology announces the manufacture of the 5 billion samples.
Size: 1.14 MB
Language: en
Added: Aug 20, 2024
Slides: 22 pages
Slide Content
Introduction to pic16f877-pic16f877A Lecture note 4
The original name of this microcontroller is PICmicro ( Peripheral Interface Controller ), but it is better known as PIC. Its ancestor, called the PIC1650, was designed in 1975 by General Instruments . It was meant for totally different purposes. Around ten years later, this circuit was transformed into a real PIC microcontroller by adding EEPROM memory. Today, Microchip Technology announces the manufacture of the 5 billion samples. PIC MICROCONTROLLERS
The PIC16F877 has three types of memory ROM , RAM and EEPROM . All of them will be separately discussed since each has specific functions, features and organization. PIC18f877x MEMORY ROM MEMORY ROM memory is used to permanently save the program being executed. This is why it is often called ‘program memory’. The PIC16F887 has 8Kb of ROM (in total of 8192 locations). Since the ROM memory is made with FLASH technology, its contents can be changed by providing a special programming voltage (13V). However, it is not necessary to explain it in detail as being automatically performed by means of a special program on the PC and a simple electronic device called the programmer.
PIC18f877x MEMORY EEPROM MEMORY Similar to program memory, the contents of EEPROM is permanently saved, even when the power goes off. However, unlike ROM, the contents of EEPROM can be changed during the operation of the microcontroller. This is why this memory (256 locations) is perfect for permanently saving some of the results created and used during the operation.
PIC18f877x MEMORY RAM MEMORY This is the third and the most complex part of microcontroller memory. In this case, it consists of two parts: general-purpose registers and special-function registers (SFR). All these registers are divided in four memory banks to be explained later in this course. The RAM memory is partitioned into four banks . Prior to accessing any register during program writing (in order to read or change its contents), it is necessary to select the bank which contains that register. Two bits of the STATUS register are used for bank selection to be discussed later. In order to simplify the operation, the most commonly used SFRs have the same address in all banks, which enables them to be easily accessed.
RAM MEMORY BANKS
CORE SFRS The following text describes the core SFRs of the PIC16F887 microcontroller. Bits of each of these registers control different circuits within the chip, so that it is not possible to classify them in some special groups. For this reason, they are described along with the processes they are in control of. STATUS Register The STATUS register contains: the arithmetic status of data in the Accumulator W register (A register in Atmel), the RESET status and the bank select bits for data memory.
RP1 RP0 Active Bank Bank0 1 Bank1 1 Bank2 1 1 Bank3 IRP - Bit selects register bank. It is used for indirect addressing. 1 - Banks 0 and 1 are active (memory locations 00h-FFh) - Banks 2 and 3 are active (memory locations 100h-1FFh) RP1,RP0 - Bits select register bank. They are used for direct addressing. STATUS Register
TO - Time-out bit. 1 - After power-on, after executing the CLRWDT instruction which resets the watch-dog timer or the SLEEP instruction which sets the microcontroller into low-consumption mode. - After watch-dog timer time-out has occurred. PD - Power-down bit. 1 - After power-on or after executing the CLRWDT instruction which resets the watchdog timer. - After executing the SLEEP instruction which sets the microcontroller into low-consumption mode. Z - Zero bit 1 - The result of an arithmetic or logic operation is zero. - The result of an arithmetic or logic operation is different from zero. DC - Digit carry/borrow bit is changed during addition and subtraction if an ‘overflow’ or a ‘borrow’ of the result occurs. 1 - A carry-out from the 4th low-order bit of the result has occurred. - No carry-out from the 4th low-order bit of the result has occurred. C - Carry/Borrow bit is changed during addition and subtraction if an ‘overflow’ or a ‘borrow’ of the result occurs, i.e. if the result is greater than 255 or less than 0. 1 - A carry-out from the most significant bit (MSB) of the result has occurred. - No carry-out from the most significant bit (MSB) of the result has occurred. STATUS Register
RBPU - Port B Pull up Enable bit. 1 - PortB pull-ups are disabled. 0 - PortB pull-ups are enabled. OPTION_REG Register The OPTION_REG register contains various control bits to configure Timer0/WDT prescaler , timer TMR0, external interrupt and pull-ups on PORTB. We will discuss other bits later … T0CS - TMR0 Clock Source Select bit. 1 - Transition on TOCKI pin. - Internal instruction cycle clock ( Fosc /4).