Upload
tyler-wadding
View
217
Download
2
Embed Size (px)
Citation preview
The Practice of Micro-processor
Yonam Institute of Digital Technology
04. FND (7-Segment) Control
2
7-Segment LED usually used to display represented information LED can not easily display variant information 7-Segment device designed to solve the problem Using in our life:
Elevator’s floor indicator, Digital Clocks, Electric board, …
External Form & Structure
Overview of 7-SegmentOverview of 7-Segment
a
b
cd
gf
e
p
Anode Common 7-Segment A device which organized 8 LED each LED has VCC(Logic ‘H’) status for Off
and GND(Logic ‘L’) status for On
Overview of 7-SegmentOverview of 7-Segment
3
Hexadecimal output in 7-Hexadecimal output in 7-Gegment(Anode)Gegment(Anode)
4
Display HEX dot(p) g f e d c b a
0 0xc0 1 1 0 0 0 0 0 0
1 0xf9 1 1 1 1 1 0 0 1
2 0xa4 1 0 1 0 0 1 0 0
3 0xb0 1 0 1 1 0 0 0 0
4 0x99 1 0 0 1 1 0 0 1
5 0x92 1 0 0 1 0 0 1 0
6 0x82 1 0 0 0 0 0 1 0
7 0xd8 1 1 1 1 1 0 0 0
8 0x80 1 0 0 0 0 0 0 0
9 0x98 1 0 0 1 0 0 0 0
a 0x99 1 0 0 0 1 0 0 0
b 0x83 1 0 0 0 0 0 1 1
c 0xc6 1 1 0 0 0 1 1 0
d 0xa1 1 0 1 0 0 0 0 1
e 0x86 1 0 0 0 0 1 1 0
f 0x8e 1 0 0 0 1 1 1 0
. 0x7f 0 1 1 1 1 1 1 1
Test-Board contains four 7-Segments
7-Segments in Test Board7-Segments in Test Board
5
Port Specify
PA transmit data to 7-Segment using its data line which connected parallely (Output)
PB.0~3 control 7-Segments through connected 2SA1015 Transistors
Arrangement of 7-Segment Components
7-Segment Display
Data Bus, Chip Select Jumper
Chip Select Q3 Q2 Q1 Q06
7
Wiring Diagram
AVR8535MCU Module
Multi DigitalBreadboard
PA.0 ●
PA.1 ●
PA.2 ●
PA.3 ●
PA.4 ●
PA.5 ●
PA.6 ●
PA.7 ●
● Q.0
● Q.1
● Q.2
● Q.3
● A
● B
● C
● D
● E
● F
● G
● P
PB.0 ●
PB.1 ●
PB.2 ●
PB.3 ●
PB.4 ●
PB.5 ●
PB.6 ●
PB.7 ●
8583PA PORT
8583PB PORT
7-SegmentPart
7-SegmentPart
Practice of 7-Segment ControlPractice of 7-Segment Control
4 개의 7-Segment에 ‘ 1111’을 디스플레이하게 하라 .
insert ‘0xf9’ into ‘PORTA’ permit ‘0’ or ‘1’ to ‘PORTB’
0 means that it select corresponding chip(FND) ex) PORTB.0=0; or PORTB.0=1;
b
c
8
4 개의 7-Segment에 ‘ a~p’를 반복하여 순회하게 하라 .
…
Order p g f e d c b a
1(0xff) 1 1 1 1 1 1 1 1
2(0xfe)
1 1 1 1 1 1 1 0
3(0xfd)
1 1 1 1 1 1 0 1
4(0xfb)
1 1 1 1 1 0 1 1
5(0xf7)
1 1 1 1 0 1 1 1
6(0xef)
1 1 1 0 1 1 1 1
7(0xdf)
1 1 0 1 1 1 1 1
8(0xbf)
1 0 1 1 1 1 1 1
9(0x7f)
0 1 1 1 1 1 1 1
9
10
4 개의 7-Segment에 숫자 ‘ 0~9’를 오름차순으로 디스플레이 하라 .
4 개의 7-Segment에 숫자 ‘ 0~9’를 내림차순으로 디스플레이 하라 .
…
…
Advanced PracticeAdvanced Practice
7-Segment에 ‘ 0000’ → ‘9999’ 업 카운터하며 디스플레이 하라 .
7-Segment에 ‘ 9999’ → ‘0000’ 다운 카운터하며 디스플레이 하라 .
Digital Input의 Switch를 On시킨 횟수를 카운터하여 7-Segment에 디스플레이 하라 .
다음과 같이 Digital Input의 위치를 가정하여 Switch의 동작을 7-Segment에 반영하여 디스플레이 하라 .
11
+ - + -+ -+ -