Chapter 1
Chapter 1
EMBEDDED
SYSTEMS
CHAPTER ONE:
UNDERSTANDIN
G EMBEDDED
SYSTMES
Wikipedia
Cont’d…
Elements of a computer
Instruction sets
The Complex Instruction Set Computer and
The Reduced Instruction Set Computer
Memory types
Organizing memory
Elements of a Computer
Instruction Set – CISC and RISC
Volatile
This is memory that only works as long as it
is powered. It loses its stored value when
power is removed but can be used as
memory for temporary data storage. A
slightly more descriptive name is simply
‘data memory’. (RAM)
Non-volatile
This is memory that retains its stored value
even when power is removed.
A more descriptive name is ‘program
memory’. (ROM)
Organizing Memory
Microprocessors and Microcontrollers
Statement Number 2:
“A microcontroller has a
microprocessor.”
Microprocessors
The first microprocessors appeared in the
1970s.
CPU onto a single IC.
Significant processing power was available at rather
low cost, in a comparatively small space.
At first, memory and input/output interfacing,
were outside the microprocessor.
Gradually, the microprocessor became more
self-contained.
CPU was becoming more powerful and faster.
Moved rapidly from 8-bit to 16- and 32-bit devices.
The development of the microprocessor led very
directly to applications like the personal computer.
Microcontrollers
The data memory is just 25 bytes for the 508 or 41 for the 509. Notice
that Microchip call the RAM memory locations ‘file registers’ or
elsewhere just ‘registers’.
Program memory appears top left, with 512 12-bit words for the
12F508 or 1024 for the 509.
Cont’d…
A distinctive feature of the PIC architecture is that it is Harvard structure.
We should therefore be able to find two address buses (one for program
memory, and the other for data memory and all peripherals) and two data
buses (again, one for program memory, and one for data memory and
peripherals).
The easiest to find is the data bus for data memory and peripherals.
This is simply labeled ‘data bus’ and is seen to the right of the diagram. It
is 8-bit, and primarily serves the data memory, the General-Purpose
Input/Output (GPIO) and the ‘Timer 0’ peripheral.
The address bus for data memory is labeled ‘RAM Addr’ and feeds into
the RAM data memory.
It is derived from the address multiplexer (‘Addr MUX’), which selects the
address from one of two sources.
Cont’d…
The program address bus arises from the Program
Counter and goes only to the program memory, as
shown.
It is 12-bit, and hence can address 212 memory
locations, or 4096 locations.
As the program memory itself is given as only 512 or
1024 words, we recognize that the address bus is larger
than necessary for this memory size.
Coming from the program memory we see the 12-bit
‘Program bus’.
This carries the instruction words from the memory to
the ‘Instruction register’.
Cont’d…
This microcontroller has only two on-chip peripheral devices,
a Timer (‘Timer 0’) and the General-Purpose
Input/Output port, with pins GP0 to GP5.
The IC pins themselves appear in the block diagram as
squares with crosses inside.
Each of these pins is dual or triple function, so each has a
second function identified in the diagram.
Towards the bottom left of the diagram are a number of
functions relating to the clock oscillator, power
supply and reset.
Power supply and ground are connected via pins VDD and
VSS respectively.
Cont’d…
A ‘Power-on Reset’ function detects when power is applied and
holds the microcontroller in a Reset condition while the power
supply stabilizes.
The MCLR input can be used to place the CPU in a Reset
condition and to force the program to start again.
An internal clock oscillator (‘Internal RC OSC’) is provided so
that no external pins whatsoever need be committed to this
function.
External oscillator connections can, however, be made, using
input/output pins GP4 and GP5.
The oscillator signal is conditioned for use through the
microcontroller in the ‘Timing Generation’ unit.
The ‘Watchdog Timer’ is a safety feature, used to force a reset
in the processor if it crashes.
~~~~ END OF CHAPTER 1
~~~~