An Introduction to PIC Microcontrollers.ppt
《An Introduction to PIC Microcontrollers.ppt》由会员分享,可在线阅读,更多相关《An Introduction to PIC Microcontrollers.ppt(42页珍藏版)》请在麦多课文档分享上搜索。
1、An Introduction to PIC Microcontrollers,Supervised by : Dr. Loai Tawalbeh,Jordan University of Science & Technology Faculty of Computer & Information Technology Computer Engineering Department,Rami Mohammad Al-Sheikh Fady Ahmad Ghanim,Overview,Introduction,What is PIC? - A family of Harvard architec
2、ture microcontrollers made by Microchip Technology- Derived from the PIC1650 originally developed by General Instrument Microelectronics Division. - The name PIC was originally an acronym for “Programmable Intelligent Computer“.,Introduction,Why PIC is popular?,low cost ,wide availability with high
3、clock speed availability of low cost or free development tools Only 37 instructions to remember serial programming and re-programming with flash memory capability Its code is extremely efficient, allowing the PIC to run with typically less program memory than its larger competitors PIC is very small
4、 and easy to implement for non-complex problems and usually accompanies to the microprocessors as an interface,Two Different Architectures,Harvard Architectures (newer arch.),Von-Neumann Architecture,Two Different Architectures,Harvard ArchitecturesUsed mostly in RISC CPUs Separate program bus and d
5、ata bus: can be of different widths For example, PICs use: Data memory (RAM): a small number of 8bit registers Program memory (ROM): 12bit, 14bit or 16bit wide (in EPROM, FLASH, or ROM),Von-Neumann ArchitectureUsed in: 80X86 (CISC PCs) Only one bus between CPU and memory RAM and program memory share
6、 the same bus and the same memory, and so must have the same bit width Bottleneck: Getting instructions interferes with accessing RAM,RISC vs. CISC,Reduced Instruction Set Computer (RISC) Used in: SPARC, ALPHA, Atmel AVR, etc. Few instructions(usually 50) Only a few addressing modes Executes 1 instr
7、uction in 1 internal clock cycle (Tcyc),Complex Instruction Set Computer (CISC) Used in: 80X86, 8051, 68HC11, etc. Many instructions(usually 100) Several addressing modes Usually takes more than 1 internal clock cycle (Tcyc) to execute,Family Core Architecture Differences,The PIC Family: Cores 12bit
8、 cores with 33 instructions: 12C50x, 16C5x14bit cores with 35 instructions: 12C67x,16Cxxx16bit cores with 58 instructions: 17C4x,17C7xxEnhanced 16bit cores with 77 instructions: 18Cxxx,The PIC Family: Speed,Can use crystals, clock oscillators, or even an RC circuit. Some PICs have a built in 4MHz RC
9、 clock, Not very accurate, but requires no external components! Instruction speed = 1/4 clock speed (Tcyc = 4 * Tclk)All PICs can be run from DC to their maximum specified speed:,Clock and Instruction Cycles,Instruction Clock Clock from the oscillator enters a microcontroller via OSC1 pin where inte
10、rnal circuit of a microcontroller divides the clock into four even clocks Q1, Q2, Q3, and Q4 which do not overlap. These four clocks make up one instruction cycle (also called machine cycle) during which one instruction is executed. Execution of instruction starts by calling an instruction that is n
11、ext in string. Instruction is called from program memory on every Q1 and is written in instruction register on Q4. Decoding and execution of instruction are done between the next Q1 and Q4 cycles. On the following diagram we can see the relationship between instruction cycle and clock of the oscilla
12、tor (OSC1) as well as that of internal clocks Q1-Q4. Program counter (PC) holds information about the address of the next instruction.,Pipelining in PIC,Instruction Pipeline Flow,The PIC Family: Program Memory,Technology: EPROM, FLASH, or ROM It varies in size from one chip to another.- examples:,Th
13、e PIC Family: Data Memory,PICs use general purpose “File registers” for RAM (each register is 8bits for all PICs)- examples:,PIC Programming Procedure,For example: in programming an embedded PIC featuring electronically erasable programmable read-only memory (EEPROM). The essential steps are:Step 1:
14、 On a PC, type the program, successfully compile it and then generate the HEX file.Step 2: Using a PIC device programmer, upload the HEX file into the PIC. This step is often called “burning“.Step 3: Insert your PIC into your circuit, power up and verify the program works as expected. This step is o
15、ften called “dropping“ the chip. If it isnt, you must go to Step 1 and debug your program and repeat burning and dropping.,PIC16F877A Features,High Performance RISC CPU: Only 35 single word instructions to learnAll single cycle instructions except for program branches, which are two-cycleOperating s
16、peed: DC - 20 MHz clock input DC - 200 ns instruction cycle,PIC16F877A Pin Layout,PIC Memory,The PIC16F877A has an 8192 (8k) 14bit instruction program memory368 Bytes Registers as Data Memory : Special Function Registers: used to control peripherals and PIC behaviors General Purpose Registers: used
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
2000 积分 0人已下载
下载 | 加入VIP,交流精品资源 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- ANINTRODUCTIONTOPICMICROCONTROLLERSPPT
