RANDOM PAGE
SITE SEARCH
LOG
IN
SIGN UP
HELP
To gain access to revision questions, please sign up and log in.
A2
aSystem on a Chip
A family of integrated circuits that contain all the sub-systems needed to make programmable control systems on a single chip.
Compare this with a traditional PC where multiple chips and subsystems are needed. Smart-phones and tablet PCs use many techniques "borrowed" from microcontrollers and are working towards one-chip designs.
- Processor
- Data bus, instruction bus, address bus and control bus
- Memory
- Flash to hold the program
- RAM to hold temporary data
- ROM to hold permanent code such as the serial communications chip programming routines.
- Input port/s
- Output port/s
- A serial link to allow the chip to be programmed
- Many chips have extra built-in features like
- analogue inputs with an ADC
- pulse width modulation outputs for motor speed control
- serial output for connecting to LCD text displays
Von Neumann Architecture
Processors based on the Von Neumann architecture have three buses.
- Data Bus - Carries data. This is bidirectional for read and write operations.
- Address Bus - This uniquely identifies which memory location is being read or written.
- Control Bus - This determines whether data is to be read or written. There are other control bus wires for handling interrupts and selecting memory or I/O ports.
bHarvard Architecture
These chips have an extra instruction bus. This allows instructions to be fetched at the same time as data.
This makes processing faster. This is known as the Harvard Architecture.
Fetch Execute Cycle
Step |
Von Neumann - Slower |
Harvard - Faster |
1 |
Fetch Instruction |
Fetch Instruction and Data |
2 |
Fetch Data |
Execute Instruction |
3 |
Execute Instruction |
Add 1 to the Program Counter |
4 |
Add 1 to the Program Counter |
Fetch the next instruction and data.
The Harvard chip gets more done
per clock cycle. |
cMicrocontrollers
- low cost
- fairly simple to use
- easy to interface to transducers including sensors and control actuators
- versatile
- can be re-programmed for use in many different domestic and industrial control applications
- reliable (there are no moving parts)
- can interface to complex text or graphical displays
dBenefit to Society
- domestic appliances become cheaper
- domestic appliances become more useful and versatile (programmable bread maker, washing machine, clock radio, DVD Recorder, etc)
- devices provide more information to the user (electricity meters can now display power usage in a visible location (not under the stairs). This allows users to save energy, money and the planet).
- car engine management processors save fuel, carbon emissions and reduce engine wear.
eInside Microcontrollers
The diagram above shows most of the features of a microcontroller.
fProcessor
- Fetches instructions
- Reads input data from memory and the input ports into the processor.
- Makes decisions
- Performs arithmetic
- Performs logic
- Writes output data to memory and the output ports.
gClock
- Synchronises all the operations within the microprocessor.
hMemory (ROM, RAM, Flash)
- ROM: Read Only Memory.
- Non Volatile - retains its data when the power is off.
- RAM: Random Access Memory
- Volatile - data is lost when the power is off.
- Flash
- Non volatile memory that can be erased and re-programmed
iInput/Output Ports
- Used to connect the processor to the outside world.
- The processor WRITES to the port to send out control data.
- The processor READS input data from the port. This is also called polling.
jVon Neumann Architecture
kThree Buses
- Address Bus: Each memory location and I/O port is uniquely identified by its address. Setting the address activates exactly one memory or I/O circuit.
- Data Bus (Bidirectional): Carries data to the processor (read) of from the processor (write). Instructions and data have to be fetched in two steps. This makes this type of processor slower.
- Control Bus: Determines the read/write direction. Selects memory/IO. Carries the clock signal.
lHarvard Architecture
mFour Buses
- Address Bus: Each memory location and I/O port is uniquely identified by its address. Setting the address activates exactly one memory or I/O circuit.
- Data Bus (Bidirectional): Carries data to the processor (read) of from the processor (write).
- Control Bus: Determines the read/write direction. Selects memory/IO. Carries the clock signal.
- Instruction Bus: Carries the instructions at the same time as the data is fetched. This speeds up the processor.
nBus Widths - 2N
The bus width is important. This is a 2n calculation. You can calculate ...
- The number of unique addresses is 2N numbered from 0 to 2N - 1.
- The largest number the bus can carry: 2N - 1
- It the bus carries video data to a screen, the number of colours the screen can display
- If the bus carries data from a Gray code position sensor, the maximum number of positions that can be sensed
- 4 wire bus: 24 addresses = 16. Largest possible number is 24 - 1 = 15
- 8 wire bus: 28 addresses = 256. Largest possible number is 28 - 1 = 255
- 16 wire bus: 216 addresses = 65536. Largest possible number is 216 - 1 = 65535
oHardware and Software
pHardware
- Physical devices
- Needs a power supply
- Arrives in a box
- Installed with a screw driver, plugs and sockets or a soldering iron
- Breaks if you drop it
qSoftware
- Programs
- Data
- Can be downloaded
- Stored on a disk
- Installed by running the setup program
- Can be copied
- Can be transferred across a network
- Can be lost if you don't make a backup
rFirmware
- is software on ROM that can't be altered or on Flash Memory that can be re-programmed with suitable tools.
sWetware
- a nerdy term for processing data using a human or other animal brain.
tExtreme Performance - Thanks XKCD
reviseOmatic V3
Contacts, ©, Cookies, Data Protection and Disclaimers
Hosted at linode.com, London