Robocon 2007, Hong Kong University of Science & Technology Robocon 2007 Electronics Quickstart! Session 2 Prelude Logic Prepared by KI Chi Keung [chikeung @ ust.hk] WONG Long Sing (Sam) [sam @ hellosam.net]
Robocon 2007, HKUST Table of Contents 1.MOSFET 1.NMOS 2.PMOS 3.CMOS 2.Buffer 3.MCU Application
Robocon 2007, HKUST NMOS SymbolPhysical Cross Section See Wikipedia, MOSFET Gate Source Drain
Robocon 2007, HKUST NMOS V GS < V th Cut-off Mode V th = Thershold Voltage ≈ 1.5V (Model dependent) I DS = 0 Gate Source Drain
Robocon 2007, HKUST NMOS V GS > V th Linear Mode V DS > V GS - V th I DS will be large Gate Source Drain
Robocon 2007, HKUST PMOS Symbol Gate Drain Source
Robocon 2007, HKUST PMOS V GS < V th Cut-off Mode V th = Thershold Voltage ≈ -1.5V (Model dependent) I DS = 0 Gate Drain Source
Robocon 2007, HKUST PMOS V GS < V th Linear Mode V DS < V GS - V th I DS will be large Gate Drain Source
Robocon 2007, HKUST MOS Other commonly seen schematic symbols See Wikipedia, MOSFET N-channel P-channel
Robocon 2007, HKUST CMOS - Inverter Source Drain Not a new type of MOS, but It means combining the use of PMOS and NMOS to form interesting logic circuit Output Source Input
Robocon 2007, HKUST CMOS - Inverter Symbol Output Input
Robocon 2007, HKUST CMOS - Inverter Input High, Output Low 5V 0V 5V
Robocon 2007, HKUST CMOS - Inverter Input Low, Output High 5V 0V 5V 0V
Robocon 2007, HKUST Buffer Symbol Logically same as two inverters in serial Output Input Output Input
Robocon 2007, HKUST Buffer 5V 0V 5V 0V
Robocon 2007, HKUST Buffer 5V 0V 5V 0V 5V
Robocon 2007, HKUST Buffer With an appropriate buffer, we get a… Low impedance output Strong output Good output Internal resistance of the power source is low regardless of the input impedance.
Robocon 2007, HKUST Buffer with Enable Symbol Output Input Enable
Robocon 2007, HKUST Buffer with Enable Output Input Enable Transmission Gate
Robocon 2007, HKUST Buffer with Enable 5V
Robocon 2007, HKUST Buffer with Enable 0V 5V
Robocon 2007, HKUST Buffer with Enable Floating Hi-Z Hi-Impedance < 5V + V th > 0V - V th 5V 0V
Robocon 2007, HKUST MCU Application Device ADevice B PORT DDR PORT DDR
Robocon 2007, HKUST MCU Application Device A DDR = 1 PORT = 0 Device B DDR = 1 PORT = 0 0V 5V 0V 5V 0V
Robocon 2007, HKUST MCU Application Device A DDR = 1 PORT = 0 Device B DDR = 0 0V 5V X 0V
Robocon 2007, HKUST MCU Application Device A DDR = 1 PORT = 1 Device B DDR = 1 PORT = 0 5V 0V 5V ~2.5V
Robocon 2007, HKUST MCU Application Device A DDR = 0 Device B DDR = 0 X 0V X X
Robocon 2007, HKUST MCU Application – Pull Up Device ADevice B PORT DDR PIN PORT DDR PIN DDR | ~PORT
Robocon 2007, HKUST MCU Application – Pull Up Device A DDR = 0 PORT = 0 Device B DDR = 0 PORT = 0 0V X X 5V X
Robocon 2007, HKUST MCU Application – Pull Up Device A DDR = 0 PORT = 1 Device B DDR = 0 PORT = 0 0V 1 5V 0V 1 5V
Robocon 2007, HKUST MCU Application – Pull Up Device A DDR = 1 PORT = 0 Device B DDR = 0 PORT = 0 0V 0 5V 0 0V
Robocon 2007, HKUST MCU Application – Pull Up Device A DDR = 1 PORT = 1 Device B DDR = 0 PORT = 1 5V 0V 1 5V 1 0V 5V
Robocon 2007, HKUST MCU Application – Pull Up Device A DDR = 1 PORT = 0 Device B DDR = 0 PORT = 1 5V 0V 0 5V 0 0V
Robocon 2007, HKUST MCU Application – Pull Up Device A DDR = 1 PORT = 1 5V 1
Robocon 2007, HKUST MCU Application – Pull Up Device A DDR = 1 PORT = 1 5V X Tends to 0V
Robocon 2007, HKUST MCU Application – Pull Up Device A DDR = 0 PORT = 1 5V 0V 1 5V
Robocon 2007, HKUST MCU Application – Pull Up Device A DDR = 0 PORT = 1 5V 0V 0