งานนำเสนอกำลังจะดาวน์โหลด โปรดรอ

งานนำเสนอกำลังจะดาวน์โหลด โปรดรอ

บัญญัติ สมสุพรรณ อิเล็กทรอนิกส์ วิทยาลัยเทคนิคอุบลราชธานี

งานนำเสนอที่คล้ายกัน


งานนำเสนอเรื่อง: "บัญญัติ สมสุพรรณ อิเล็กทรอนิกส์ วิทยาลัยเทคนิคอุบลราชธานี"— ใบสำเนางานนำเสนอ:

1 บัญญัติ สมสุพรรณ อิเล็กทรอนิกส์ วิทยาลัยเทคนิคอุบลราชธานี
PIC microcontrollers บัญญัติ สมสุพรรณ อิเล็กทรอนิกส์ วิทยาลัยเทคนิคอุบลราชธานี ELectronic วท.อุบลราชธานี

2 ความแตกต่างระหว่าง microcomputer กับ microcontroller
ELectronic วท.อุบลราชธานี

3 โครงสร้างภายในของไมโครคอนโทรเลอร์
Arithmetic Logic Unit (ALU) Control Unit Memory Port รวมกันเรียกว่า CPU = Central Processing Unit หรือ MPU = Micro Processing Unit หรือ up = Microproceser ELectronic วท.อุบลราชธานี

4 ประเภทของไมโครคอนโทรลเลอร์
ประเภท CISC (Complex Instruction Set Computer) ประเภท RISC (Reduce Instruction Set Computer ) ELectronic วท.อุบลราชธานี

5 ไมโครคอนโทรลเลอร์ ประเภท CISC (Complex Instruction Set Computer) แนวคิดในการพัฒนาซีพียูโดยการนำระบบเดิมมาปรับปรุง สร้างคำสั่งใหม่ เพิ่มวงจรเข้าไปให้ทำงานดีขึ้น ทำให้วงจรมีความซับซ้อนและมีคำสั่งเพิ่มขึ้นเรื่อยๆ และทำให้วงจรมีขนาดใหญ่ ได้แก่ z80, Motorola 68030, Intel i486, Intel Pentium, Intel Celeron, AMD Athlon, AMD Sempron ELectronic วท.อุบลราชธานี

6 ไมโครคอนโทรลเลอร์ ประเภท RISC (Reduce Instruction Set Computer ) เนื่องจากชนิด CISC ยิ่งพัฒนายิ่งมีขนาดใหญ่ และ คำสั่งมากขึ้น ทำให้พัฒนาได้ยากมากขึ้น จึงได้มีแนวคิดในการออกแบบใหม่ให้มีขนาดเล็กลง ลดขนาดคำสั่งลง ได้แก่ PIC, ARM, AVR ELectronic วท.อุบลราชธานี

7 ชนิดของ PIC (Peripheral Interface Controller )
1. One Time Programmable (OTP) เป็นชิพที่มีราคาถูก โปรแกรมได้แค่ครั้งเดียว จะมีตัวอักษร C แสดงบนตัวชิพ เช่น 16C74, 16C84 2. EPROM สามารถเขียนโปรแกรมเข้าไป และสามารถลบ โปรแกรมเดิม ด้วยแสง Ultra Violet (UV) 3. Electronically Erasable Programmable Read Only Memory (EEPROM) เป็นชิพที่สามารถเขียนหรือลบด้วยสัญญาณทางไฟฟ้า มีตัวอักษร F เช่น 16F84 ELectronic วท.อุบลราชธานี

8 ELectronic วท.อุบลราชธานี
องค์ประกอบของ Pic Register I/0 Port ELectronic วท.อุบลราชธานี

9 ELectronic วท.อุบลราชธานี
ประเภทของ PIC แบ่งตามหน่วยประมวลผลได้ 3 ประเภท 32 Bit 8 Bit 16 Bit ELectronic วท.อุบลราชธานี

10 ELectronic วท.อุบลราชธานี
PIC 16F877 Plastic dual in-line package (DIP) Complexer 40 pins IC 8 K Woord (14 bit) Program memory 368 Bytes data memory 256 Bytes EEPROM I/O Port 35 pin Speciale function: 10 chanal 8-bit analog input SPI serial port USART serial communicatie Brown-out detection In-circuit programmable ELectronic วท.อุบลราชธานี

11 ELectronic วท.อุบลราชธานี
รูปทรงต่างๆของ PIC16F877 Quad Flat Package (QFP) Plastic Leaded Chip Carrier Package (PLCC) ELectronic วท.อุบลราชธานี

12 คุณลักษณะ Pic16F877 Key Features PIC16F877 ELectronic วท.อุบลราชธานี
MAX Operating Frequency 20MHz FLASH Program Memory (14-bit words) 8K Data Memory (bytes) 368 EEPROM Data Memory (bytes) 256 I/O Ports RA0-5 (6) RB0-7 (8) RC0-7 (8) RD0-7 (8) RE0-2 (3) Timers 3 CCP 2 Serial Communications MSSP, USART Parallel Communications PSP 10-bit Analog-to-Digital Module 8 Channels Instruction Set 35 Instructions Pins (DIP) 40 Pins คุณลักษณะ Pic16F877 ELectronic วท.อุบลราชธานี

13 ELectronic วท.อุบลราชธานี
pic16F877 มี Peripheral ที่นำไป สร้างเป็นชิ้นงานได้ อย่างหลากหลาย ELectronic วท.อุบลราชธานี

14 PIC16F877 Peripheral features
1. I/O Ports: PIC16F877 has 5 I/O ports: PORT A has 6 bit wide, Bidirectional PORT B, C, D have 8 bit wide, Bidirectional PORT E has 3 bit wide, Bidirectional In addition, they have the following alternate functions: ELectronic วท.อุบลราชธานี

15 PIC16F877 Peripheral features
Each port has 2 control registers: TRISx sets whether each pin is an input(1) or output(0) PORTx sets their output bit levels or contain their input bit levels. เช่น TRISC = // ให้ Port C เป็น Output Port PORTB = // ให้ Port B เป็น 0 Pin functionality “overloaded” with other features. Most pins have 25mA source/sink thus it can drive LEDs directly. ELectronic วท.อุบลราชธานี

16 PIC16F877 Peripheral features
2. Analog to Digital Converter (ADC) Only available in 14bit and 16bit cores Fs (sample rate) < 54KHz The result is a 10 bit digital number Can generate an interrupt when ADC conversion is done The A/D module has 4 registers: A/D Result High Register (ADRESH) A/D Result Low Register (ADRESL) A/D Control Register0 (ADCON0) A/D Control Register1 (ADCON1) Multiplexed 8 channel inputs Must wait T acq to change up sampling capacitor. Can take a reference voltage different from that of the controller. ELectronic วท.อุบลราชธานี

17 PIC16F877 Peripheral features
3. Timer/counter modules Generate interrupts on timer overflow Can use external pins as clock in/ clock out (ie. for counting events or using a different Fosc) There are 3 Timer/counter modules: Timer0: 8-bit timer/counter with 8-bit pre-scaler Timer1: 16-bit timer/counter with 8-bit pre-scaler, can be incremented during SLEEP via external crystal/clock Timer2: 8-bit timer/counter with 8-bit period register, pre-scaler and post-scaler. ELectronic วท.อุบลราชธานี

18 PIC16F877 Peripheral features
4. Universal Synchronous Asynchronous Receiver Transmitter (USART/SCI) with 9-bit address detection. Asynchronous communication: UART (RS 232 serial) Can do 300bps – 115kbps 8 or 9 bits, parity, start and stop bits, etc. Outputs 5V  needs a RS232 level converter (e.g MAX232) ELectronic วท.อุบลราชธานี

19 PIC16F877 Peripheral features
Synchronous communication: i.e with clock signal SPI = Serial Peripheral Interface 3 wire: Data in, Data out, Clock Master/Slave (can have multiple masters) Very high speed (1.6Mbps) Full speed simultaneous send and receive (Full duplex) I2C = Inter IC 2 wire: Data and Clock Master/Slave (Single master only; multiple masters clumsy) Lots of cheap I2C chips available; typically < 100kbps ELectronic วท.อุบลราชธานี

20 PIC16F877 Peripheral features
5. Capture, Compare, PWM modules Capture is 16-bit, max. resolution is 12.5 ns Compare is 16-bit, max. resolution is 200 ns PWM max. resolution is 10-bit 6. Synchronous Serial Port (SSP) with SPITM (Master mode) and 12CTM (Master/Slave) 7. Parallel Slave Port (PSP) 8-bits wide, with external RD, WR and CS controls ELectronic วท.อุบลราชธานี

21 ELectronic วท.อุบลราชธานี
ตระกูล PIC ELectronic วท.อุบลราชธานี

22 จังหวะการทำงานของ CPU ต่อ รอบคำสั่ง
1 คำสั่ง อ่านข้อมูลจาก - Key Memory SenSor ถอดรหัส ข้อมูล ปฏิบัติตาม รหัสที่ถอด ช่วง Execute ช่วง Fetch ELectronic วท.อุบลราชธานี

23 ELectronic วท.อุบลราชธานี

24 ELectronic วท.อุบลราชธานี
PIC 16F877 Program Memory Banked memory: instelbaar met het STATUS register ELectronic วท.อุบลราชธานี

25 ELectronic วท.อุบลราชธานี
PIC 16F877 Data Memory ELectronic วท.อุบลราชธานี

26 ELectronic วท.อุบลราชธานี
PIC 16F877 – I/O port 3 Input/Output port PORT A : push-pull op RA3:RA0 en RA5 Open collector op RA4 ELectronic วท.อุบลราชธานี

27 ELectronic วท.อุบลราชธานี
PIC 16F877 – I/O port PORT B : High Z inputs RB7:RB4 aangesloten op de interrupt ELectronic วท.อุบลราชธานี

28 ELectronic วท.อุบลราชธานี
PIC 16F877 – I/O port PORT C : TRIS C=1 : INPUT TRIS C=0 : OUTPUT Meerdere functies. O.a. Schmitt trigger ELectronic วท.อุบลราชธานี

29 ELectronic วท.อุบลราชธานี
PIC 16F877 – I/O port Andere port: PORT D/TRIS D: Schmitt-trigger input buffer PORT E/TRIS E : Schmitt-trigger input buffers Analoge ingangen: verspreid over andere port ELectronic วท.อุบลราชธานี

30 ELectronic วท.อุบลราชธานี
จบแล้ว..ครับ ELectronic วท.อุบลราชธานี


ดาวน์โหลด ppt บัญญัติ สมสุพรรณ อิเล็กทรอนิกส์ วิทยาลัยเทคนิคอุบลราชธานี

งานนำเสนอที่คล้ายกัน


Ads by Google