Thư viện tri thức trực tuyến
Kho tài liệu với 50,000+ tài liệu học thuật
© 2023 Siêu thị PDF - Kho tài liệu học thuật hàng đầu Việt Nam

Esd ch7 2016 p1
Nội dung xem thử
Mô tả chi tiết
8/9/2016
1
ĐẠI HỌC QUỐC GIA TP.HỒ CHÍ MINH
TRƯỜNG ĐẠI HỌC BÁCH KHOA
KHOA ĐIỆN-ĐIỆN TỬ
BỘ MÔN KỸ THUẬT ĐIỆN TỬ
Bộ Môn Kỹ Thuật Điện Tử - ĐHBK
1
Embedded System Design
Chapter 7: Peripherals for embedded
systems
7.1 Digital parallel input / output
7.2 LCD interfacing
7.3 Analog input /output
7.4 Serial communication
Bộ môn Kỹ Thuật Điện Tử - ĐHBK
1. Digital parallel input / output
• Commonly used input peripherals
– DIP switches, push‐button keys, keyboards, and A/D converters
• DIP switch
– One side of the switch is tied high
• To a power supply through a resistor called a pull‐up resistor
– The other side is grounded
– The logic level changes when the position is switched
• Push‐button key
– Same as the DIP switch except that contact is momentary
Chapter 7 - p1 2
8/9/2016
2
Bộ môn Kỹ Thuật Điện Tử - ĐHBK
SWITCH ON I/O PORTS
3
very small
current needed
when the switch is open,
the input floats to a noisesensitive
the circuit waste a
large current
Chapter 7 - p1
Bộ môn Kỹ Thuật Điện Tử - ĐHBK
Switch Input
Chapter 7 - p1 4
8/9/2016
3
Bộ môn Kỹ Thuật Điện Tử - ĐHBK 5
Digital input for PIC
Active Low-Button
Input
Active High-Button
Input Transistor Input
Chapter 7 - p1
Bộ môn Kỹ Thuật Điện Tử - ĐHBK 6
Switch hardware debouncing
Switch hardware debounce
(a) without debounce capacitor
(b) with debounce capacitor
Ex: With a 10k pull‐up resistor, a 10 nF
capacitor would give a time constant of 100 ms,
which should be more than adequate
Chapter 7 - p1 6