300 likes | 440 Views
PENGANTAR SINGLE CHIP COMPUTER. Technology of Chips. ZIP (zig-zag in-line package). PGA (Pin Grid Array). IC. SOIC (small-outline IC). DIP (Dual in line package). PLCC (Plastic Leaded Chip Carrier). QFP (Quad Flat Package). Microcontroller vs. Microprocessors.
E N D
PENGANTAR SINGLE CHIP COMPUTER Editor: Syahrul
Technology of Chips ZIP (zig-zag in-line package) PGA (Pin Grid Array) IC SOIC (small-outline IC) DIP (Dual in line package) PLCC (Plastic Leaded Chip Carrier) QFP (Quad Flat Package) Editor: Syahrul
Microcontroller vs. Microprocessors General-purpose microprocessor • CPU for Computers • No RAM, ROM, I/O on CPU chip itself • Example: 8 bits => Z-80, Z-180, 8085, 8080 16 bits = > 80286, M16, MSP430, Arm7 32 bits = > M32, 68332, Pentium 64 bits => Pentium4… Many chips on mother’s board Data Bus CPU General-Purpose Micro-processor Serial COM Port I/O Port RAM ROM Timer Address Bus General-Purpose Microprocessor System Editor: Syahrul
Microcontroller vs. Microprocessors Microcontroller : • A smaller computer • On-chip RAM, ROM, I/O ports... • Example:Motorola’s 6811, Intel’s 8051, Zilog’s Z8 and PIC 16X CPU RAM ROM A single chip Serial COM Port I/O Port Timer Microcontroller Editor: Syahrul
Microprocessorvs.Microcontroller Microcontroller • CPU, RAM, ROM, I/O and timer are all on a single chip • fix amount of on-chip ROM, RAM, I/O ports • for applications in which cost, power and space are critical • single-purpose Microprocessor • CPU is stand-alone, RAM, ROM, I/O, timer are separate • designer can decide on the amount of ROM, RAM and I/O ports. • expansive • versatility • general-purpose Editor: Syahrul
Microprocessor Editor: Syahrul
Microcontroller Editor: Syahrul
Examples of Embedded Systems Editor: Syahrul
Inside 8051 Microcontroller The Intel 8051 is a Harvard architecture single chip microcontroller which was developed by Intel in 1980 for use in embedded systems. Features: • 16 bit timers (usually 2, but may have more, or less). • 4 8-bit ports, (short models have 2 8-bit ports). • 3 internal and 2 external interrupts. • 16-bit program counter and data pointer • 12 clock cycles / instruction • 4KB flash PEROM (program) • 128 byte RAM for data • Equipped with serial communication • 8-bit data bus • 16-bit address bus (1 byte wide memory addresses) • 34 general purpose registers each of 8 bits • 210 bit-addressable locations Ex-interrupt Timer/Counter Timer 1 Counter Inputs Flash ROM 4 K Bytes Interrupt control Data RAM 128 Bytes Timer 0 CPU Bus control Serial port PORT OSC TxD RxD P0 P1 P2 P3 Editor: Syahrul
Inside 8051 Microcontroller 18 17 10 0F 08 07 Editor: Syahrul
Companies Producing 8051 • Table 1-2:Some Companies Producing a Member of the 8051 Family Editor: Syahrul
Konfigurasi penyemat (pin) 8051 Editor: Syahrul
PEMROGRAMAN ASSEMBLY Format Program Bahasa assembly 8051 : • Setiap baris instruksi terdiri dari paling banyak empat field yang dipisahkan oleh karakter space atau tab: [Label:] Mnemonic [operand] [, operand] [. . .] [;comment] mulai: MOV A, #25h ; isikan hexa 25 ke reg akumulator • Label mewakili alamat instruksi (atau data). Jika program bercabang ke instruksi ini, maka label ini digunakan oleh instruksi branch atau jump • Mnemonic merupakan operasi yang harus dikerjakan • Operand adalah A, #25h, A menunjukkan register akumulator dan #25h adalah bilangan hexa 25 • Comment adalah ;isikan hexa 25 ke reg akumulator , komentar harus didahului tanda titik koma yang menyatakan bahwa bagian tersebut tidak diproses menjadi kode mesin dalam proses kompilasi Editor: Syahrul
Berikut contoh instruksi pembacaan port: Instruksi-instruksi Pembacaan Port X = Y = 0, 1,2, 3, 4, 5, 6, 7 Editor: Syahrul
PEMROGRAMAN ASSEMBLY • JENIS INSTRUKSI: • Instruksi transfer data • Instruksi aritmetika • Instruksi Logika • Instruksi pencabangan (branch / jump, call) Editor: Syahrul
Contoh Instruksi Transfer Data Editor: Syahrul
Contoh Instruksi Transfer Data Editor: Syahrul
Contoh Instruksi Transfer Data *) Untuk pemakaian pada memori program internal, instruksi MOV dituliskan dengan menambahkan akhiran CmenjadiMOVC Editor: Syahrul
Contoh Instruksi Transfer Data *) Untuk pengaksessan memori eksternal, instruksi MOV dituliskan dengan menambahkan akhiran XmenjadiMOVX Editor: Syahrul
Contoh Instruksi Aritmetika Editor: Syahrul
Contoh Instruksi Aritmetika Editor: Syahrul
Contoh Instruksi Logika Editor: Syahrul
Contoh Instruksi Logika Editor: Syahrul
Any questions ? Editor: Syahrul