Presentation is loading. Please wait.

Presentation is loading. Please wait.

Kustanto,S.T.,M.EngECE/CS-352: Embedded Microcontroller Systems Embedded Systems By: Kustanto,S.T.,M.Eng.

Similar presentations


Presentation on theme: "Kustanto,S.T.,M.EngECE/CS-352: Embedded Microcontroller Systems Embedded Systems By: Kustanto,S.T.,M.Eng."— Presentation transcript:

1 Kustanto,S.T.,M.EngECE/CS-352: Embedded Microcontroller Systems Embedded Systems By: Kustanto,S.T.,M.Eng

2 Materi Kuliah Embedded sistem Sistem Berbasis Mikrokontroler Perancangan Sisten Perangkat Lunak Pengukuran dan Generate Pewaktuan Memori Sistem Akuisisi Data Sistem Kendali Berbasis Microkomputer Komunikasi dan Jaringan Prof. Cherrice TraverECE/CS-352: Embedded Microcontroller Systems

3 Kustanto,S.T.,M.EngECE/CS-352: Embedded Microcontroller Systems Embedded Microcontroller Systems

4 Prof. Cherrice TraverECE/CS-352: Embedded Microcontroller Systems Overview Basic components of digital computers Microcontrollers and Embedded Systems Applications and Common Microcontrollers The MCS-51 Family of Microcontrollers On-chip memory, registers On-chip facilities overview

5 Prof. Cherrice TraverECE/CS-352: Embedded Microcontroller Systems Basic Components of Digital Computer CPU Memory I/O CPU Memory I/O Could be a chip, a board, or several boards

6 Prof. Cherrice TraverECE/CS-352: Embedded Microcontroller Systems Microcontrollers CPU ROM RAM I/O A single chip Subsystems: Timers, Counters, Analog Interfaces, I/O interfaces Memory

7 Prof. Cherrice TraverECE/CS-352: Embedded Microcontroller Systems Embedded Systems

8 Prof. Cherrice TraverECE/CS-352: Embedded Microcontroller Systems Real Time Control Must be able to respond predictably and in a known amount of time Environment cannot wait for microcontroller to respond.

9 Prof. Cherrice TraverECE/CS-352: Embedded Microcontroller Systems Embedded System General Block Diagram Microcontroller (uC) sensor Sensor conditioning Output interfaces actuator indicator

10 Prof. Cherrice TraverECE/CS-352: Embedded Microcontroller Systems Common Microcontrollers Atmel ARM Intel 8-bit 8XC42 MCS48 MCS51 8xC251 16-bit MCS96 MXS296 National Semiconductor COP8 Microchip 12-bit instruction PIC 14-bit instruction PIC PIC16F84 16-bit instruction PIC NEC Motorola 8-bit 68HC05 68HC08 68HC11 16-bit 68HC12 68HC16 32-bit 683xx Texas Instruments TMS370 MSP430 Zilog Z8 Z86E02

11 ATMEL Microcontrollers (MCS-51 Family) Prof. Cherrice TraverECE/CS-352: Embedded Microcontroller Systems

12 Prof. Cherrice TraverECE/CS-352: Embedded Microcontroller Systems Microcontroller Architectures CPU Program + Data Address Bus Data Bus Memory Von Neumann Architecture CPU Program Address Bus Data Bus Harvard Architecture Memory Data Address Bus Fetch Bus 0 0 0 2n2n

13 Prof. Cherrice TraverECE/CS-352: Embedded Microcontroller Systems MCS-51 “Family” of Microcontollers 8051 introduced by Intel in late 1970s Now produced by many companies in many variations The most pupular microcontroller – about 40% of market share 8-bit microcontroller

14 Prof. Cherrice TraverECE/CS-352: Embedded Microcontroller Systems “Original” 8051 Microcontroller Oscillator and timing 4096 Bytes Program Memory 128 Bytes Data Memory Two 16 Bit Timer/Event Counters 8051 CPU 64 K Byte Bus Expansion Control Programmable I/O Programmable Serial Port Full Duplex UART Synchronous Shifter Internal data bus External interrupts subsystem interrupts Control Parallel ports Address Data Bus I/O pins Serial Input Serial Output

15 Prof. Cherrice TraverECE/CS-352: Embedded Microcontroller Systems Review Binary/Hexidecimal DecimalBinaryHexidecimal 00000 0 100011 200102 300113 401004 501015 601106 701117 810008 910019 101010A 111011B 121100C 131101D 141110E 151111F Conversions: 1000 1110 (binary) 8 E (hex) Notations for hex: 0x8E 8Eh 8E 16

16 Prof. Cherrice TraverECE/CS-352: Embedded Microcontroller Systems On-Chip DATA Memory: RAM Internal RAM

17 Prof. Cherrice TraverECE/CS-352: Embedded Microcontroller Systems Registers 07 06 05 04 03 02 01 00 R7 R6 R5 R4 R3 R2 R1 R0 0F 08 17 10 1F 18 Bank 3 Bank 2 Bank 1 Bank 0 Four Register Banks Each bank has R0-R7

18 Prof. Cherrice TraverECE/CS-352: Embedded Microcontroller Systems Bit Addressable Memory 20h – 2Fh (16 locations X 8-bits = 128 bits) 7F78 1A 10 0F08 0706050403020100 27 26 25 24 23 22 21 20 2F 2E 2D 2C 2B 2A 29 28 Bit addressing: mov C, 1Ah or mov C, 23h.2

19 Prof. Cherrice TraverECE/CS-352: Embedded Microcontroller Systems Special Function Registers DATA registers CONTROL registers Timers Serial ports Interrupt system Analog to Digital converter Digital to Analog converter Etc. Addresses 80h – FFh Direct Addressing used to access SPRs

20 Prof. Cherrice TraverECE/CS-352: Embedded Microcontroller Systems On-Chip Memory: Program/Data

21 Prof. Cherrice TraverECE/CS-352: Embedded Microcontroller Systems 8051 CPU Registers A (Accumulator) B PSW (Program Status Word) SP (Stack Pointer) PC (Program Counter) DPTR (Data Pointer) Used in assembler instructions

22 Prof. Cherrice TraverECE/CS-352: Embedded Microcontroller Systems On-Chip Facilities Overview (Original 8051) Parallel Input/Output Ports System Clock Generator Serial Port Timers Interrupt Control

23 Prof. Cherrice TraverECE/CS-352: Embedded Microcontroller Systems Parallel I/O Ports Port0 latch Port1 latch Port2 latch Port3 latch Port0Port1Port2Port3 Each port can be input or output Direction is set in Special Function Registers

24 Prof. Cherrice TraverECE/CS-352: Embedded Microcontroller Systems System Clock Generator Input circuit 8051 sysclk Original 8051 uses 12 sysclk cycles per “machine cycle” External crystal oscillator

25 Prof. Cherrice TraverECE/CS-352: Embedded Microcontroller Systems Serial Port (UART) Serial Port TX (transmit) RX (receive) Data sent and received serially BAUD rate must agree between sender and receiver Transmission modes selected using SFR Original 8051 had one serial port

26 Prof. Cherrice TraverECE/CS-352: Embedded Microcontroller Systems Internal Timers Original 8051 has 2 timers 16 bits TH0 : TL0 Timer 0 16 bits TH1 : TL1 Timer 1 Timers increment on each system clock Timer registers (TH0, TL0, TH1, TL1) can be read or written to Timer overflow can cause “interrupts” or set SFR bits high

27 Prof. Cherrice TraverECE/CS-352: Embedded Microcontroller Systems Interrupt Control Original 8051 has five sources of interrupts Timer 1 overflow Timer 2 overflow External Interrupt 0 External Interrupt 1 Serial Port events (buffer full, buffee empty, etc) Interrupts enabled and disabled using SFR

28 Prof. Cherrice TraverECE/CS-352: Embedded Microcontroller Systems 1.Interupsi adalah suatu permintaan khusus kepada mikroposesor untuk melakukan sesuatu. Bila terjadi interupsi, maka komputer akan menghentikan dahulu apa yang sedang dikerjakannya dan melakukan apa yang diminta oleh yang menginterupsi.  Register yang perlu diset: TCON, IE

29 Selesai Prof. Cherrice TraverECE/CS-352: Embedded Microcontroller Systems


Download ppt "Kustanto,S.T.,M.EngECE/CS-352: Embedded Microcontroller Systems Embedded Systems By: Kustanto,S.T.,M.Eng."

Similar presentations


Ads by Google