Microcontroller basic.pdf

(1021 KB) Pobierz
FYS3240
PC-based instrumentation and microcontrollers
Microcontroller basics
Spring 2013 – Lecture #4
Bekkeng, 8.1.2013
Lab: AVR Studio
Microcontrollers can be programmed using Assembly or C
language
AVR studio 5
– Works as editor for Assembly and C
– Integrated C-compiler (AVR-GCC)
http://www.avrfreaks.net/
Microcontroller (µC or uC)
• Microcontrollers have:
– CPU
– Memory
– I/O
• Microcontroller characteristics:
– Used for control and measurements (not a general-purpose
computer)
– Does one task and runs one program continuously
– Low power (e.g. 50 mW vs. 50 W or more for a PC)
– Don’t have keyboard and monitor jacks (example of an embedded
system)
– Must use ports to perform I/O
• Selecting a microcontroller
– Should be appropriately scaled for the job
Microprocessors vs. Microcontrollers
CISC vs. RISC
CISC
(Complex Instruction Set Computer)
– Many modern microcontrollers are based on the CISC concept.
– The typical CISC microcontroller has well over 80 instructions, many very
powerful and specialised.
– The advantages of the CISC architecture is that many of the instructions are
‘macro-like’, allowing the programmer to use one instruction in place of many.
RISC
(Reduced Instruction Set Computer)
– The benefits of RISC design simplicity are a smaller chip, smaller pin count, and
very low power consumption.
Zgłoś jeśli naruszono regulamin