Anda di halaman 1dari 12

Embedded System Basic Introduction Lecture 1

Common Questions in Embedded System/Microcontroller Subject


What is Embedded Programming (EP)? term for the computer programming that uses stand alone micro-controllers (MCU) as the target to run the program. MCU operates in many computer-controlled, i.e. home appliances, machine, cars, toys etc. EP is very different from desktop or mainframe programming, embedded programs make piece of hardware/system becoming intelligent, performing certain action which doesnt not require human intervention.

Common Questions in Embedded System/Microcontroller Subject


What is an Embedded System? Theres no perfect answer, for our purposes, let define an embedded system is one that uses one or more microcomputers, running custom programs and connected to specialized hardware, to perform a dedicated set of functions. Some examples of embedded systems are the Alarm / security system, Car cruise control, ABS, Vending machine, Irrigation system etc.
Process
(MCU, MPU)

Sense
(Sensors)

Control
(Analog)

Software

Embedded Control System

Common Questions in Embedded System/Microcontroller Subject


What is different about Embedded Programming (EP) ? EP must work closely with the specialized components and custom circuitry that makes up the hardware. Includes both hardware of the CPU and all the peripherals (both on-chip and off-chip) of the system. Compare to PC programming, most embedded systems are quite limited in resource, program memory (Flash) and data memory (RAM) sizes much less compare to the Gbytes/Mbytes in the desktop. The processors core used will often be smaller 8,16 and 32bit devices as opposed to the 64 bit and larger devices found in a desktop.

Common Questions in Embedded System/Microcontroller Subject


What is the difference between microprocessor and microcontroller? A microprocessor processes data. Its a single-chip central processing unit (CPU), being the "brains" of a computer. A computer is built around a microprocessor, along with program and data memory, and I/O devices and other peripherals as needed. A microcontroller (C ) controls the operation of a machine (e.g. with a program). Its a single chip device which has on board not only a microprocessor but also, on the same chip, nonvolatile program (Flash/EEROM/EPROM/ROM) and volatile data (RAM) memories, along with useful peripherals such as general-purpose I/O (GPIO), timers and serial communications channels.

uController Vs uProcessor
Microprocessor (MPU): CPU(s) that connect to external memory and peripherals. The CPU contains the basic arithmetic, logic, and control elements of a computer that are required for processing data. e.g., Intel 8008, 8080, 8086, 80286, Pentium, etc. Microcontroller (MCU): CPU core with memories, I/O and peripherals integrated in a single-chip system, used for control application. e.g., Intel 8048, 8051, Freescale HC08,S08,S12,HC11, HC16 and etc.

Common Questions in Embedded System/Microcontroller Subject


What is an N-bit CPU/microprocessor/microcontroller? If the device can perform most of its data manipulation instructions on data words to a maximum of N bits in size, the device is an N-bit processor. 8-bit microcontrollers are the biggest segment of the embedded market. Many applications simply dont need any more power, and never will. 16-bit devices are more powerful, but they are squeezed between the 8-bit devices on the low end and the 32-bit devices on the high end. 32-bit devices are at the high end of the embedded spectrum for complex or high-performance designs.

Microcontroller Bit Definition


4,8,16,32 are current options. Bus A bus is a data pathway between several hardware components inside or outside a computer. It not only connects the parts of the CPU to each other, but also links the CPU with other important hardware. The capacity of a bus is expressed as bits. A larger capacity bus is faster in data transfer. For example, a 32-bit bus is faster than an 8-bit bus
ADDRESS: tells which module (RAM, ROM, IO) interacts with the CPU. DATA: information to be transferred from/to processor to/from other devices. CONTROL: specifies direction (read, write) and when transfer takes place.

Common Questions in Embedded System/Microcontroller Subject


How does an embedded program run? Assumption: program is loaded it into the C program memory. The run starts when you either turn on the device or you push the RESET button. When the C comes out of reset it will always go to a particular memory location (defined by the manufacturer), to begin executing whatever code is found there. The fixed memory location is a vector, a location that holds the actual address of the beginning of the program, e.g. upon coming out of reset, the controller will load its program counter with the value found at program address 0xFFFE. One need to ensure the specified startup address is loaded into the reset address vector.

Common Questions in Embedded System/Microcontroller Subject


How does an embedded program run? (cont) When an embedded program starts to run, there is usually a fair amount of initialization that must be done before the main program begins. (In desktop computers this is handled by the computer boot code and operating system). No OS, and all boot code and other startup code must be explicitly provided. Some very critical hardware may need to be initialized first e.g. hardware that controls memory access times and address maps, as well as system clock hardware. Then some software initialization may need to happen, such as setting up a stack pointer and perhaps copying data from nonvolatile memory to volatile memory where it can be accessed and perhaps modified. After that will usually come another round of hardware initialization, setting up any peripheral devices that the system requires (i.e. speed, communication config, and setting initial output states )

Where are Microcontroller?

PC peripherals hospital beds electric wheel chairs lighting control systems environmental and building automation access control panels laboratory equipment

Stationary barcode scanners and barcode printers patient monitoring systems security systems building & HVAC controls industrial networking products
11

Typical Applications
USB

Pot or Accel Sensor

IIC
ADC IIC MEM

Inputs
PWM BLDC
Adapt Board

ADC Input Channels

S08 MCU

SCI

RS232 RS485

SPI Zigbee
TPM Dim LED Buzzer External Event Input Channels

Segment LCD

GPIO LED Outputs

GPIO Inputs

Anda mungkin juga menyukai