CPU: execute/process info stored in memory, and is
connected to I/O devices and memory through strips of wire called bus, CPU puts address on address bus in binary and decoding cktry finds the device
program stored in memory provide inst to CPU
the function of CPU is to fetch data and execute them
1. CPU uses to register to store temp data, info could
be two values to be processed or address of values to be fetched from memory, register can be 8, 16, 32, 64 bit,
bigger the register better the CPU
2. CPU
3. every CPU has Program Counter which points the
address of the next instruction to be executed, contents of Program Counter are placed on the address bus to find and fetch desired instruction, PC is a register called instruction pointer
4. instruction decoder interprets the instruction
fetched into the CPU. it stores meaning of each instruction and what steps should CPU take upon recieving a given instruction, CPU understand more instructions requires more transister to design I/O: provide a means of communication with CPU
for device (memory/IO) recognized by CPU assign an
address, no two devices are allowed to have same address
buses; control,data and address
more data bus better the CPU, so expensive
processor power is related to the size of buses
address bus: used to identify device and memory
connected to it. more address bus more devices connected.
no of locations=2^x; x is no of address lines
each location can have maximum of 1 byte of data
2^x bytes of memory
unidirectional b/c CPU uses address bus to send out
address
ROM: provide info that is fixed and permanat e.g total
RAM on system RAM: store temporary info that change with time e.g various versions of OS or app pkgs such as word processing and calculators
programs are loaded from hdd into RAM to be
processed by CPU
CPU can't get program directly from HDD b/c of slow
speed
CPU seek info from RAM if data is not there then it
will seek from mass storage device, then it transfer info to RAM
RAM/ROM: primary memory
HDD: secondary memory
General purpose microprocessor system: RAM, ROM,
I/O port, timer, serial COM port are connected externally to up
in embedded system typically only one application
software is burned into ROM
x86 PC is connected to various emebedded products
such as keyboard, disk controller, modem, sound card, CD ROM driver, mouse and so on
x86 PC embedded application: some time a
microcontroller is inadequote for the task, for this reason many general purpose microprocessor like intel, freescale semiconductor and AMD have targeted their microprocessor for high end embedded market
when a company targets general purpose
microprocessor for the embedded market it optimize the processor used for embedded system, for this reason these processor are often called high end embedded processor. ARM
one of the most critical need for ESystem is to
decrease power consumption and space, this can be achieved by integrating more and more function into CPU chip,
in designing motherboard we need CPU plus a chipset
containing I/O, a cashe controller, a flash ROM containing BIOS, and finally a secondary cache memory.
Criteria in choosing microcontroller
1. meeting the computing need of the task at hand
efficiently and cost efficiently, whether 8 or 16 or 32 bit microcontroller can handle the task best, among other considerations in this category are
a. Speed: what is the highest speed microcontroller
support
b. packaging: does it come in DIP or QFP (quad flat
package) or some other packaging format, this is important in term of space, prototyping, assembling the end product c. Power consumption: specially criteria for battery powered products
d. the amount of ROM and RAM on chip
e. the no of I/O pin and timer on chip
f. ease of upgrade to high performance or lower-
power-consumption versions
g. cost per unit: this is important in term of the final
cost of the product in which a microcontroller is used. for example some microcontroller cost 50 cent per unit when purchased 100,000 at a time
2. how easy development product around it.
availability of software and hardware development tools such as compiler, assembler, debugger, and emulators.
3. wide availability and reliability of microcontroller
PIC 12xxx/14xxx have 12 bit and 14 bit wide inst
PIC 18xxx instruction is 16 bit wide and available in
18 to 80 pin packages to make it an ideal choice for new designs
pic 18xxx features
has a RISC arch and comes with standard feature e.g
on chip program (code) ROM, data RAM, data EEPROM, timers, ADC, USART and I/O ports
has 2MB of program (code) ROM, PIC18xxx program
ROM is available in different memory types such as Flash, OTP, and masked, all of which have different part number
PIC microcontroller with UV-EPROM: some pic uc use