ESD-Ch3 2018 P1 PDF
ESD-Ch3 2018 P1 PDF
ESD-Ch3 2018 P1 PDF
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Ử
1. Hardware components
2. Design block diagrams
3. Micro controller
4. Board bus
1
1. Hardware components
1. Microprocessors/Microcontrollers
– 8/16/32‐bit microcontroller: PICs, ARMs
– DSP
2. Peripherals
– Input devices: button, switch, keyboard, mouse, touch‐screen
– Display devices: LED, text LCD, graphic LCD
– Sensors: temperature, humidity, light, motion
– Actuators: motor, solenoid, relay, FET, triac, SCR
– Interfaces: UART, USB, I2C, SPI, Ethernet, Wifi, Bluetooth, Zigbee
3. Clock / reset circuits
4. Power supply
– AC/DC adapters
– Battery
microprocessor
Actuator: relay
– Use an arrow for a connection
One way One way
Curve connection
Heater
– No block diagram name
– Wrong direction of connection
– Problem of single / multiple connections
– No data type of connections
IR sensor
PIC
Microcontroller
SIM900
=> Make this block diagram better!
• Step1. Make a list of required hardware interfaces
• Select the architecture
– Do we need to process 16/32 bit data often?
– Can the application get by with 8/16 bit
architectures?
– Are there libraries that support the architecture
we chose?
• Identify Memory Needs
– What is the largest data structure?
– How much is the size of the RTOS/libraries we will
use?
• Start searching for microcontrollers
– Supplier like Digikey, Arrow or other trusty
website.
– Chip manufacturer website (microchip, ST,TI,
Atmel, etc)
– https://en.wikipedia.org/wiki/List_of_common_m
icrocontrollers
• Examine Costs and Power Constraints
– If the device will be powered from a battery and
mobile, low‐power feature is absolutely necessary
– Price is very important with large quantity project
• Check part availability
– Are they kept in stock at multiple distributors or is
there 6 – 12 week lead time?
– What are your requirements for availability?
– When will this part be obsolete? (life cycle)
• Step 8: Select a development kit
– Is there any development kit available?
• Step 9: Investigate compilers and tools,
resource
– Can we have C compiler, IDE and programming
tools?
– Does this micro controller has good support
(community, libraries, resource)
Once, with a
PROM No device n/a n/a Moderate Fast
programmer
Yes, with a Limited
Entire
EPROM No device (consult Moderate Fast
Chip
programmer datasheet)
Fast to
Limited read, slow
EEPROM No Yes Byte (consult Expensive to
datasheet) erase/writ
e
Fast to
Limited read, slow
Flash No Yes Sector (consult Moderate to
datasheet) erase/writ
e
Expensive
NVRAM No Yes Byte Unlimited (SRAM + Fast
battery)
Bộ môn Kỹ Thuật Điện Tử 33
Memory mapped bus
rd'/wr D<0...7
P0 D Q
Processor Memory >
A<0...15
enable /CS >
/OE
ALE G /WE
addr[0-11] CS2 /CS
8 1
data[0-7] P2
74373
/WR /CS
/RD HM6264
D<0...7>
/PSEN
A<0...14>
bus
/OE
bus structure
27C256
8051
P0 Adr. 7..0 Data
P2 Adr. 15…8
Q Adr. 7…0
ALE
/RD
VCC
R104
10k
JD02
nPSEN 1 2
PROG_MEM_OVERLAP
nCS.[0..7]
U104
A.13 1 15 nCS.0
A.14 2 A Y0 14 nCS.1
A.15 3 B Y1 13 nCS.2
VCC C Y2 12 nCS.3
6 Y3 11 nCS.4
4 G1 Y4 10 nCS.5
5 G2A Y5 9 nCS.6
G2B Y6 7 nCS.7
Y7
74LS138
• Multiple data, control, and possibly power wires
– One bit per wire
• High data throughput with short distances
• Typically used when connecting devices on same IC or same
circuit board
– Bus must be kept short
• long parallel wires result in high capacitance values which requires more
time to charge/discharge
• Data misalignment between wires increases as length increases
• Higher cost, bulky
Question:
List some parallel communications and peripherals you know?
• Single data wire, possibly also control and power wires
• Words transmitted one bit at a time
• Higher data throughput with long distances
– Less average capacitance, so more bits per unit of time
• Cheaper, less bulky
• More complex interfacing logic and communication protocol
– Sender needs to decompose word into bits
– Receiver needs to recompose bits into word
– Control signals often sent on same wire as data increasing protocol
complexity
Standard baudrate:
1200, 2400, 4800, 9600, 19200, 38400, 57600 and 115200
Find and list all the modules and sensor you know that
use UART interface?
• I2C (Inter‐IC)
– Two‐wire serial bus protocol developed by Philips Semiconductors
nearly 20 years ago
– Enables peripheral ICs to communicate using simple communication
hardware
– Data transfer rates up to 100 kbits/s and 7‐bit addressing possible in
normal mode
– 3.4 Mbits/s and 10‐bit addressing in fast‐mode
– Common devices capable of interfacing to I2C bus:
• EPROMS, Flash, and some RAM memory, real‐time clocks, watchdog
timers, and microcontrollers
From From
Servant receiver
D
C
S A A A A R A D D D A S O
T R 6 5 0 / C 8 7 0 C T P
T w K K
Typical read/write cycle
• A 4‐wire communications bus • Always full‐duplex
• Typically communicate across short distances – Communicates in both
directions simultaneously
• Supports
– Single master – Transmitted (or received)
data may not be meaningful
– Multiple slaves
• Synchronized • Multiple Mbps transmission
speeds
– Communications are “clocked”
– 0‐50 MHz clock speeds not
Bus wires uncommon
• Master-Out, Slave-In (MOSI)
• Transfer data in 4 to 16 bit
• Master-In, Slave-Out (MISO)
• System Clock (SCLK)
characters
• Slave Select/Chip Select (SS1#, …, • Supports multiple slaves
SS#n or CS1, …, CSn)
• Cons
– Slave select/chip select makes multiple slaves more
complex
– No acknowledgement (can’t tell if clocking in garbage)
– No inherent arbitration
– No flow control (must know slave speed)
Bộ môn Kỹ Thuật Điện Tử 50
Other board bus
• One wire
• USB
• PCI
• LVDS