12-04-2012, 10:45 AM
Introduction to Programming Embedded Systems
Introduction to Programming Embedded Systems.pdf (Size: 2.22 MB / Downloads: 246)
Goals
Rough understanding of the underlying hardware.
Understand how to develop software for the lab platform.
2
CSE480/CIS700 S. Fischmeister 3
What is An Embedded System?
A general-purpose definition of embedded systems is that they are
devices used to control, monitor or assist the operation of
equipment, machinery or plant. “Embedded” reflects the fact that
they are an integral part of the system. In many cases, their
“embeddedness” may be such that their presence is far from
obvious to the casual observer.
Institute of Electrical Engineers (IEE)
CSE480/CIS700 S. Fischmeister 4
For Us
PIC18F2680
o 3,328 B RAM
o 64kB ROM
o 1.024 B EEPROM
o 5 MIPS @ 20MHz
o A/D converters
o 1x UART
o 1x 8bit Timer
o 3x 16bit Timer
3
CSE480/CIS700 S. Fischmeister 5
Will use in the PICDEM2 board to
Blink LEDs
Control an LCD display
Communicate via the serial line
with a PC
Communicate via the CAN
protocol with other microchips
Drive a stepper motor
CSE480/CIS700 S. Fischmeister 6
Use it further to
Control a modular robot:
4
7
A Microprocessor
Introduced as a programmable replacement for logic-based circuits
in the 1970s.
Advantages compared to logic-based circuits:
o Provide functional upgrades (e.g., add new feature to machine tool
after deployment)
o Provide easy maintenance upgrades (e.g., fix a bug in the cell phone
via an SMS firmware upgrade)
o Less fragile (e.g., instead of hundreds discrete logic chips and wiring
only one microprocessor)
o Protection of intellectual property (it is more difficult to copy software
burnt in the on-chip memory than to check the part numbers and the
wiring)
5
CSE480/CIS700 S. Fischmeister 9
What makes a Microprocessor?
Processor
o An arithmetic logic unit (ALU) for processing.
Memory
o Permanent memory for keeping the program (= ROM)
o Volatile memory for computation (= RAM)
o Rewritable permanent memory for logging, tuning, storing intermediate
data (= EEPROM)
Connectivity to peripherals
o Binary outputs via single chip pins
o Integrated asynchronous and synchronous serial interfaces such as
UART, I2C, RS232, CAN
CSE480/CIS700 S. Fischmeister 10
What makes a Microprocessor?
Timers
o Event counting, input capture, real-time interrupt, watchdog timer
o Pulse-width modulation (PWM)
Support for the analogue world
o Analog-to-digital converter (ADC)
o Digital-to-analog converter (DAC)
Software debug support hardware
o JTAG