CECS 347 Microprocessors and Controllers II
Download
Report
Transcript CECS 347 Microprocessors and Controllers II
CECS 347
Microprocessors and
Controllers II
Chapter 1 - An Overview of Computing Systems
Instructor: Eric Hernandez
Introduction
General Purpose Microprocessor – CPU
vs
Microcontroller – MCU
Whats the difference?
CPU vs MCU
General Purpose CPU – CPU (Central Processing Unit)
No Internal:
RAM
ROM
I/O
Microcontroller – MCU (Micro-Controller Unit)
MCU Contains:
CPU Timers
RAM ADC/DAC
ROM
I/O Ports
Everything
conveniently on
one chip or IC –
Integrated Circuit
We will be using a Microcontroller
that has the ARM architecture
Specifically the LPC2148
Even though the LPC2148 is made by Phillips, inside is
an ARM processor
So now our MCU looks more like this
Phillips pays
for this
Then Phillips adds what they want
to and puts it all on one chip
Then and Now
• In November 1971, The first microprocessor, the Intel
4004, was introduced
• Today, of the processors produced about 99% are
Microcontrollers!
• Initially 4 bit, then 8 bit (think of the 8051), then 16 bit
and now 32 bit (ARM) architectures
• Of the 13 billion microprocessor-based chips shipped in
2007, nearly 3 billion were ARM based
• ARM chips are found in 95% of all cell phones
ARM Offerings
• Since 1994, ARM has continued to offer new
generations of microprocessors
ARM6
ARM7
ARM9
ARM10
ARM11
and then to the newer generations, Cortex
ARM Offerings
Our MCU
The Philips LPC2148 uses the ARM7TDMI
The ARM7TDMI is still widely used and will lay the
foundation for us
Processor Architecture Overview - CISC
•
Early processor architectures reflected the architectural
concept of the time and were greatly influenced by the
design tools available to support the development
•
Complex Instruction Set Computers (CISC) were typically
microprogrammed machines that would execute a
sequence of microinstructions for every macroinstruction
(machine instruction)
•
Capability was increased by adding microinstruction to
make more complicated instructions
•
Performance was increased by increased speed and power
(fans and even water helped to cool the system)
Processor Architecture Overview - RISC
• Reduced Instruction Set Computers (RISC) primarily
came out of Stanford and Berkeley in the 1980’s
(Hennessy and Patterson - 440 text authors)
• Goal was a simplified architecture that would rapidly
execute the instructions - the goal would be that one
instruction would be completed on every clock
• This is contrasted to the CISC architecture where one
instruction could take over 30 clocks to finish
• RISC - rapidly execute simplified instructions
CISC vs. RISC
CISC
• Multiword instructions
• Many clocks per instruction
• Microcoded control unit
• Operands available throughout memory space
RISC
• Single word instructions
• One clock per instruction (goal)
• Pipelined architecture
• Hardwired control unit
• Operands always registers
• All memory interface through LOADs and
• STOREs (load/store architecture)
The ARM Processor History
•
Acorn Computers were developed in the UK intending to
service the educational demand
•
Original computer utilized the 6502 (same as the Apple II
and Nintendo)
•
Desire for a more powerful processor and teaming with
Apple led to the development of the ARM processor and the
founding of ARM Ltd.
•
Acorn RISC Machine became Advanced RISC Machine
(ARM)
•
Initially targeted for the Apple Newton PDA
•
In 1993 ARM introduced the ARM7TDMI (T: THUMB (16
bits) mode, D: Debug, M: Hardware Multiplier, I: ICE)
Development Board
LPC2148 Development Board - $60
http://shop.ngxtechnologies.com/product_info.php?cPath=21
&products_id=28&osCsid=ebe77041c1d2b14c1e6246593693
18f0
LPC2148 Contains
512KB of internal flash
32+8K RAM,
60Mhz Max Freq.
USB 2.0 device, 2xUARTs
RTC
2x10bit ADCs, 1xDAC,
6xPWM, 2xI2C, 1xSPI, 2x32bit TIMERS, FAST I/0
support and WDT.
In System Programming
(ISP)
Two ways to program
JTAG
UART Serial Port
Programming through the Serial Port is similar to how we
developed on the 8051
Where to get a JTAG
To use the JTAG you must have a JTAG adapter.
Ebay has clones for sale that cost $20
Benefits:
• Download programs to your target hardware
• Examine memory and registers
• Single-step through programs and insert multiple breakpoints
• Run programs in real-time
• Program Flash Memory
• On-the-fly debug