AVR Session 1 PDF
AVR Session 1 PDF
AVR Session 1 PDF
session 5
1.
Compilation
process
Assembly Language , Instruction
Cycle , and the journey to executable
2
Assembly language
Low level programming language
very strong (but often not one-to-one)
correspondence with machine code
very close to hardware speed !
3
Instruction
cycle
fetch-decode-execute cycle
Basic operational process
5
6
The journey to the
executable
IDE
Editor
Environment
Pre-processor
Compiler
Assembler
Linker
7
IDE
Integrated development environment
Editor + Environment
8
Environment
Pre-processor
Compiler
Assembler
Linker
9
Compilation process
code.c ??
10
11
12
Embedded
system !
13
14
Special purpose
VS
general purpose
computers
15
Microprocessor
&
Microcontroller
Whos better ?!
16
17
Inside the MCU :
CPU
Buses
Peripherals
Memory
18
19
Inside the CPU :
Registers
ALU
Program counter
Instruction decoder
20
21
Special purpose
&
general purpose
registers
22
Harvard
&
von neumann
architecture
23
24
Criteria for choosing
a microcontroller :
25
ATMELs
AVR
What does it mean ??!
AVR families :
Mega (ATmegaxxxx)
Tiny (ATinyxxxx)
Classic (AT90Sxxxx)
Special purpose
27
AVR features :
8-bit RISC single chip
Harvard architecture
ROM, RAM, timer and I/O ports ...
ADC, PWM, UART, SPI ...
28
29
ATMEGA32 :
Powerful
Widely available
Educational
30
Hardware
31
32
How to flash ?!
33
To burn your code :
Software
Programmer
Protocol
34
35
SPI
36
37
USBASP
Works on linux, windows
and Mac
Programming speed 5 KByte/sec
38
I/O Ports
Each port consists of
three registers bits :
DDxn DDRx
PORTxn
PORTx
PINxn PINx
39
Blinking LED !
40
Is this code good ?!
41
42
Drivers
43
THANKS!
Any questions?
hussienabdelaal105@gmail.com
44