Вы находитесь на странице: 1из 21

DIGITAL ELECTRONICS AND

MICRO-CONTROLLERS
Dr. Blent VURAL
bvural @yi di z. edu. tr
www. yarbi s. yi l di z. edu. tr/bvural
@_Vural Bul ent_
Lesson-1
Di gi t Systems and Codes
Bool e Al gebra and Logi c Gates
Ari thmeti c Logi c Uni t and Ci rcui ts
Mul ti - Functi on Logi c Ci rcui ts
Code Conveter s ve Coder I Cs
SUBJECTS
Microcontroller (MC) structure
MC units (modules)
Arithmetic operation in MC
Analog and digital data capture and
process in MC
Code Conveter s ve Coder I Cs
Fl i p- Fl op and Data Memori es
Counter Ci rcui ts and Appl i cati ons
Digital Electronics and MicroContr. YTU-ELM 2
process in MC
Data logging with MC
Timer and counter
Communication
Mano, M.M., Digital Design, Prentice Hall, 2002
Be able to learn fundementals of digital electronics
and micro-controllers.
TARGET
Be able to analyze and design basic kontrol circuit in
Digital Electronics and MicroContr. YTU-ELM 3
Be able to analyze and design basic kontrol circuit in
electrical engineering
KICK-OFF
Digital Electronics and MicroContr. YTU-ELM 4
KICK-OFF
Digital Electronics and MicroContr. YTU-ELM 5
KICK-OFF
Digital Electronics and MicroContr. YTU-ELM 6
Digital Electronics and MicroContr. YTU-ELM 7
DIGITAL SYSTEM CODES
- bit in digital systems
- Binary number
- Hexadecimal numbers
Digital Electronics and MicroContr. YTU-ELM 8
Hexadecimal numbers
- Pozitive and negative numbers
in digital systems
LOGIC 1 OR 0
bit definition:
Logic 0 = 0 V
Digital Electronics and MicroContr. YTU-ELM 9
Logic 1 = 5 V , Vcc
LOGIC 1 OR 0
Digital Electronics and MicroContr. YTU-ELM 10
LOGIC 1 OR 0
(HIGH VEYA LOW)
Digital Electronics and MicroContr. YTU-ELM 11
LOGIC 1 OR 0
(HIGH VEYA LOW)
Digital Electronics and MicroContr. YTU-ELM 12
Digital System Codes
1 bit: 01 : 2
0
4 bit: 017 : 2
3
2
2
2
1
2
0
Digital Electronics and MicroContr. YTU-ELM 13
8 bit: 0255 : 2
7
2
6
2
5
2
4
2
3
2
2
2
1
2
0
16 bit: 0(2
16
-1) : 2
15
2
1
2
0
32 bit: 0(2
32
-1) : 2
31
2
1
2
0
64 bit: 0(2
64
-1) : 2
63
2
1
2
0
Binary numbers
The digit should be 0 or 1.
Ex: 0101.1
Digital System Codes
Digital Electronics and MicroContr. YTU-ELM 14
Ex: 0101.1
=0x2
3
+1x2
2
+0x2
1
+1x2
0
+
1x2
-1
=0+4+0+1+0.5
=5.5
0 : 0
1 : 1
2 : 2
3 : 3
4 : 4
5 : 5
Hexadecimal numbers:
Digital System Codes
5 : 5
6 : 6
7 : 7
8 : 8
9 : 9
A : 10
B : 11
C : 12
D : 13
E : 14
F : 15
Digital Electronics and MicroContr. YTU-ELM 15
Ex: 1A.3
=1x16
1
+10x16
0
+3x16
-1
=16+10+0.0625
=26.0625
(12.25)
10
= (?)
2
HOMEWORK
Digital Electronics and MicroContr. YTU-ELM 16
10 2
(420.12)
10
= (?)
16
Signed numbers:
if MSB (Most significant bit) is;
0: pozitive
1: negative
Digital System Codes
1: negative
Digital Electronics and MicroContr. YTU-ELM 17
-Ones complement
01001100
11111111 01001100 = 10110011
Digital System Codes
Digital Electronics and MicroContr. YTU-ELM 18
11111111 01001100 = 10110011
-Twos complement (Complement 1 and add 1)
10110011+1=10110100
Arithmetic operations
Summation:
+18
+07
00010010
+ 00000111
Digital System Codes
Digital Electronics and MicroContr. YTU-ELM 19
Substruction:
+07
+25
+ 00000111
00011001
+18
- 07
+11
00010010
+11111000
00001011
Multiplacation:
5x4=20
Note: Multiply with 2
n
:
shifting left, n times
4=2
2
2 times shifting
Digital System Codes
Digital Electronics and MicroContr. YTU-ELM 20
4=2
2
2 times shifting
0000101 1) 0001010
2) 0010100
Division:
50/5=10
Note: Divide 2
n
:
shifting right ,n times
12 / 4 = 3 2 times shifting
Digital System Codes
Digital Electronics and MicroContr. YTU-ELM 21
12 / 4 = 3 2 times shifting
00001100 1) 00000110
2) 00000011
00001010

Вам также может понравиться