Microcontroller - Md. Atiqur Rahman Ahad
Download
Report
Transcript Microcontroller - Md. Atiqur Rahman Ahad
MCU – Microcontroller Unit – 2
Md. Atiqur Rahman Ahad
Mechatronics
• ~ area of mechanical and electrical
engineering – having integration of mechanics
with electronics & information processing.
• The integration – between hardware &
software results an integrated system
called mechatronic system.
• Microcontroller plays a major role in
mechatronics
Selection of MCU
• Checklist
– 8/16/32 bit ALU
– Max. power dissipation
– Clock speed needed
– Instructions set RISC/CISC
Selection of MCU…
• Checklist –
– Memory architecture
– Memory size
– Cache, memory management unit, DSP
calculations
– Internal PROM/…
– I/O ports
– Cost
Selection of MCU…
• Additional checklists
– Cost when single chip and when MCU interfaces
to circuit with some features
– Major building blocks of hardware cost and
availability
– Major building blocks of software cost and
availability
– Ease of integration
– Design team expertise
– Manpower
Internal structure of a MC
• At times, a microcontroller can have external
memory also (if there is no internal memory
or extra memory interface is required).
• Most modern microcontrollers are
manufactured with CMOS technology, which
leads to reduction in size and power loss.
Harvard vs. Princeton Architecture
• In the late 1940's, the US Government asked
Harvard and Princeton universities to come up
with a computer architecture to be used in
defense apps.
• Princeton suggested computer architecture
with a single memory interface.
– Princeton architecture was accepted for simplicity
and ease of implementation
• Harvard suggested a computer with two
different memory interfaces, one for the data
/ variables and the other for program /
instructions.
– Harvard architecture became popular later, due to
the parallelism of instruction execution.
Von Neumann architecture?
• Von Neumann architecture after the name
of the chief scientist of the project in
Princeton University John Von Neumann
(1903 - 1957 Born in Budapest, Hungary).
• How to remember?
– PN [junction!] Princeton Neumann
Princeton /single mem interface
Harvard architecture
8051 microcontroller
8051
•
•
•
•
•
8051 employs Harvard [2] architecture.
8-bit CPU.
16-bit Program Counter
8-bit Processor Status Word (PSW)
8-bit Stack Pointer
Internal RAM of 128bytes
8051…
•
•
•
•
Special Function Registers (SFRs) of 128 bytes
32 I/O pins arranged as four 8-bit ports (P0 - P3)
Two 16-bit timer/counters : T0 and T1
Two external and three internal vectored
interrupts
• One full duplex [i.e., it can transmit and receive
simultaneously] serial I/O
• has about 111 instructions
Intel 8051/8031 architecture
• CPU has the control and sequencing logic
circuits, ALU, Flags, clock
• Program mem - ROM
• Interrupt control ckt
• Internal timing devices – timer
• Serial interface
• Data mem - RAM
Intel 8051/8031…
•
•
•
•
•
•
•
Special function registers
Ports
Register banks – 4 set of registers
RST – reset pin
INT – interrupt pins
VCC – voltage supply pin
GND
Intel 8051/8031 architecture
• CPU has the control and sequencing logic circuits, ALU,
Flags, clock
• Program mem - ROM
• Interrupt control ckt
• Internal timing devices – timer
• Serial interface
• Data mem – RAM
See –
http://www.sonoma.eduusersffarahmansonomacourseses310es310_s10.htm
Intel 8051/8031…
•
•
•
•
•
•
•
Special function registers
Ports
Register banks – 4 set of registers
RST – reset pin
INT – interrupt pins
VCC – voltage supply pin
GND
Courtesy –
•
•
http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/microcontrollers/micro/ui/Course_home5_37.htm
‘PIC Microcontroller and Embedded Systems, by MA Mazidi et al., Pearson, 2012