Professional Documents
Culture Documents
CSE 315 Microprocessors & Microcontrollers: Tanvir Ahmed Khan
CSE 315 Microprocessors & Microcontrollers: Tanvir Ahmed Khan
CSE 315 Microprocessors & Microcontrollers: Tanvir Ahmed Khan
Todays Topic
Counter
I
I
I
I
I
I
10
GND 11
Vcc
8 1 PB0
PortD, PD7 21 14 PD0
PortC , PC 7 29 22 PC 0
PortA, PA7 33 40 PA0
PortB, PB7
I
I
!!!Let Us C!!!
#i n c l u d e < s t d i o . h>
i n t main ( v o i d )
{
p r i n t f ( H e l l o World ! \ n ) ;
return 0;
}
#i n c l u d e <a v r / i o . h>
i n t main ( v o i d )
{
while (1){}
return 0;
}
pin configuration,
I
I
input 0
output 1
C Code Example,
I
DDRA = 0b10101010;
DDRA
o
1
i
0
Pin
33
o
1
i
0
o
1
i
0
o
1
i
0
40
C Code Example,
I
I
I
PORTA = 0b01010101;
Version 1
Version 1
Version 2
Homework
Homework
I
I
I
Serial communications
Real Homework