Beruflich Dokumente
Kultur Dokumente
10/1
What is a microcontroller ?
10/2
ATMEL AT89C51
10/4
Introduction
A chip with reads & executes a program stored in memory How the computer works is controlled by the program Must Capable of accepting, decoding and executing instructions, presented to them in binary form. Combination with I/O and memory peripheral is called microcontroller or microprocessor based system Microprocessor term also known as Central Processing Unit (CPU)
10/5
A Microcontroller system
10/6
10/7
Another term to describe a microcontroller is - embedded controller or - single-chip microcontroller Because the microcontroller and its support circuits are often built into, or embedded into one IC package.
10/8
Selecting a Microcontroller
Choose the right one for your application
Speed, Power, Size, Cost Others: package options, integrated peripherals, scalability for future growth
Other considerations
Hardware availability: make sure you can actually purchase the microcontroller before designing it in expertise, licensing, etc
10/9
Selecting a Microcontroller
Microcontroller
an application-specific processor 8051 vs. HC11 it all depends on your application
Typically, microcontrollers...
are low cost, lightweight processors require few support components for better system integration come with integrated peripherals
10/10
Selecting a Microcontroller
8051 and the 68HC11 series microcontrollers are popular in automotive industry PICs from Microchip Inc are popping up everywhere you require low cost and low performance, i.e. inside batteries, mice, toys, secure remotes
a few tens of cents in large qty. packages from 8 pins to 68 pins; typical 16 to 20 pins memory capacity from 256 bytes ROM to a few Kbytes RAM to a few hundred bytes RAM top speeds from 4 MHz to 33 MHz
10/11
CPU Evolutions
10/12
Block Diagram
External interrupts Interrupt Control On-chip ROM for program code
Timer/Counter
On-chip RAM
Timer 1 Timer 0
Counter Inputs
CPU
OSC
Bus Control
4 I/O Ports
Serial Port
P0 P1 P2 P3
TxD RxD
Address/Data
10/13
What is microcontroller ?
http://www.webopedia.com/TERM/M/microcontroller.html
A highly integrated chip that contains all the components comprising a controller.
Typically this includes a CPU, RAM, some form of ROM, I/O ports, and timers.
to control a particular
As a result, the parts can be simplified and reduced, which cuts down on production costs.
CPU
Abbreviation of central processing unit. The CPU is the brains of the computer. Sometimes referred to simply as the processor or central processor, the CPU is where most calculations take place. In terms of computing power, the CPU is the most important element of a computer system. On large machines, CPUs require one or more printed circuit boards. On personal computers and small workstations, the CPU is housed in a single chip called a microprocessor. Two typical components of a CPU are:
The arithmetic logic unit (ALU), which performs arithmetic and logical operations. The control unit, which extracts instructions from memory and decodes and executes them, calling on the ALU when necessary
10/15
remote control
TVs, VCRs and high-end stereo systems
digital cameras, cell phones, camcorders, answering machines, laser printers, telephones (the ones with caller ID, 20-number memory, etc.), pagers, and featureladen refrigerators, and dishwashers.
10/16
microcontroller characteristics :
"embedded" inside some other device
(often a consumer product)
dedicated to one task and run one specific program. often low-power devices has a dedicated input device
and often (but not always) has a small LED or LCD display for output.
small and low cost. ruggedized in some way, but not always
10/17
8051
The 8051 is relatively old. Most popular microcontrollers Derivative microcontrollers based on--and compatible with--the 8051 Many web pages, books, and tools. Latest models are by far more advanced than the original 8051 Labelled as "8051 compatible", "8051 compliant", or "8051 family" to emphasize their "noble heritage"
10/18
Microprocessor_links
Features of 8051 (http://www.archimedesinc.com/8051.htm) Describes the features of 8051 microcontroller. Instruction set overview for I8051 (http://www.ece.orst.edu/~pricec/8051/manuals/index.html) Gives an overview of the Arithmetic, Logical, Control, Data transfer and other miscellaneous instructions from the 8051 instruction set. The 8051 Microcontroller (http://www.labyrinth.net.au/~steve/8051.html) Sample source code, development tools, schematic diagrams, and many other links to 8051 microcontroller sites. 8051 Software (http://www.dcity.org/8051/software.htm) Freeware and shareware including assembler, disassembler, math functions, etc. Intel's X51 Microcontroller Page (http://www.intel.com/design/mcs51/). 8051 related topics (http://www.ece.orst.edu/~sllu/471/assemb.html ) This site discusses topics such as the 8051 Memory Organization, the Internal of 8031/51 and some Special Pins, Data and Address Accessing, Addressing Modes & Instruction Set Summary. FAQ 8051 (http://www.ece.orst.edu/~pricec/8051/faq/index.html) Frequently asked questions on the 8051. Another 8051 FAQ site (http://ee1.bradley.edu/~mrr2ro/micros/8051_faq.html) This site contains many links to FAQs for 8051 and other microcontroller users MicroLee (http://www.interlog.com/~miclee/8051.html) This site contains 8051 APPLICATION BOARD.
10/21
10/22
8051 Schematic
10/23
10/24
Port 2
Dual purpose port. Higher byte of the address bus for external code memory. General purpose I/O.
Port 1
Dedicated I/O
Port 3
Dual purpose port Pins have alternative functions General purpose I/O
10/25
10/26
Power connection
+5 volt
I/O port
Port 1,2 &3
4 LS TTL load
RST reset
Master reset
Port 0
8 LS TTL load
XTAL
Norminal crystal frequency is 12 MHz.
10/27
comparison
Part No
On-Chip ROM RAM (Bytes) Timers I/O Ports Serial Port Interrupt Sources
8031 0K 128 2 2 1 6
8032 0K 256 3 2 1 8
10/28
Parametric_Table
Self Program Memory 10-bit A/D (channels) Mask ROM (Kbytes) EEPROM (Kbytes) Flash (Kbytes) OTP (Kbytes) 16-bit Timers F.max (MHz) RAM (Bytes) Watchdog I/O Pins Vcc (V) Device AT80C51RD2 AT83C5103 AT83C51RB2 AT83C51RC2 AT83EB5114 AT87C5103 AT89C2051 AT89C2051x2 AT89C4051 AT89C51AC2 AT89C51AC3 AT89C51ED2 AT89C51IC2 AT89C51ID2 AT89C51RB2 AT89C51RC AT89C51RC2 AT89C51RD2 2 2 4 32 64 64 32 64 16 32 32 64 UART UART API API UART UART UART UART UART UART API API API API API API 2 2 2 2 12 12 16 32 4 UART TWI SPI ISP
1280 512 1280 1280 256 512 128 128 128 1280 2304 2048 1280 2048 1280 512 1280 2048
60 16 60 60 24 16 24 16 24 40 60 60 60 60 60 33 60 60
2.7-5.5 2.7-5.5 2.7-5.5 2.7-5.5 3.0-3.6 3-5.5 2.7-6.0 2.7-6.0 2.7-6.0 3-5.5 3-5.5 2.7-5.5 2.7-5.5 2.7-5.5 2.7-5.5 4.0-6.0 2.7-5.5 2.7-5.5
32 19 32 32 11 19 15 15 15 34 32 32 34 32 32 32 32 32
3 2
Yes
Yes Yes
1 1
3 3 2 2
Yes Yes
Yes
1 1 1 1 1 1 1 1 1 1 1 1
2 2 2 3 3 3 3 3 3 3 3 3 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes 8 8
10/29
Parametric_Table
Mask ROM (Kbytes) EEPROM (Kbytes) Flash (Kbytes) OTP (Kbytes) 16-bit Timers Self Program Memory RAM (Bytes) F.max (MHz) 10-bit A/D (channels) Watchdog I/O Pins Vcc (V) Device AT89C55WD AT89LP2052 AT89LP4052 AT89LS51 AT89LS52 AT89LS53 AT89LS8252 AT89LV55 AT89S51 AT89S52 AT89S53 AT89S8252 AT89S8253 T89C5115 TS80C31X2 TS80C32X2 TS80C51RA2 TS80C51RD2 UART TWI ISP SPI
20 2 4 4 8 12 8 20 4 8 12 8 12 16 SPI SPI SPI SPI SPI UART API 2 2 2 SPI SPI SPI SPI SPI SPI 2
256 256 256 128 256 256 256 256 128 256 256 256 256 512 128 256 512 1280
33 20 20 16 33 12 12 12 33 33 24 24 24 40 60 60 60 60
4.0-6.0 2.4-5.5 2.4-5.5 2.7-4.0 2.7-4.0 2.7-6.0 2.7-6.0 2.7-5.5 4.0-5.5 4.0-5.5 4.0-6.0 4.0-6.0 2.7-5.5 3-5.5 2.7-5.5 2.7-5.5 2.7-5.5 2.7-5.5
32 15 15 32 32 32 32 32 32 32 32 32 32 20 32 32 32 32
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
3 2 2 2 3 3 3 3 2 3 3 3 3 2 2 3 3 3
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
10/30
Assumed / student
done some amount of programming basic understanding of hardware firm grasp on the three numbering systems
decimal, hexadecimal, and binary number
10/31