Presentation is loading. Please wait.

Presentation is loading. Please wait.

Parallel ports, power supply, and the clock oscillator Chapter Three Dr. Gheith Abandah1.

Similar presentations


Presentation on theme: "Parallel ports, power supply, and the clock oscillator Chapter Three Dr. Gheith Abandah1."— Presentation transcript:

1 Parallel ports, power supply, and the clock oscillator Chapter Three Dr. Gheith Abandah1

2 Outline Parallel ports – Technical challenges – Connecting to the parallel port – The PIC 16F84A parallel ports Power supply Clock oscillator Dr. Gheith Abandah2

3 Data Transfer Almost any embedded system needs to transfer digital data between its CPU and the outside world. – Direct user interface, including switches, keypads, light- emitting diodes (LEDs) and displays – Input measurement information, from external sensors, possibly being acquired through an analog-to-digital converter – Output control information, for example to motors or other actuators – Bulk data transfer to or from other systems or subsystems, moving in serial or parallel form, for example sending serial data to an external memory. Dr. Gheith Abandah3

4 Output Parallel Ports Dr. Gheith Abandah4

5 Input Parallel Ports Dr. Gheith Abandah5

6 Bi-directional Parallel Ports Dr. Gheith Abandah6

7 Port electrical characteristics Dr. Gheith Abandah7 Modeling a logic gate output. (a) Generalized model. (b) Model of CMOS logic gate output

8 Schmitt trigger inputs Dr. Gheith Abandah8 Schmitt trigger characteristics. (a) Buffer with Schmitt trigger input. (b) Input/output characteristic

9 The ‘Open Drain’ output Dr. Gheith Abandah9 (a) An ‘Open Drain’ output. (b) Open Drain output driving load resistor. (c) The ‘Wired- OR’ connection

10 Connecting to the parallel port (1) Switches Dr. Gheith Abandah10 (a)SPDT connection. (b) SPST with pull-up resistor. (c) SPST with pull-down resistor Pull-up values in the range 10–100 kΩ

11 Connecting to the parallel port (2) Light-emitting diodes Dr. Gheith Abandah11

12 Connecting to the parallel port (2) Light-emitting diodes Dr. Gheith Abandah12 Driving LEDs from logic gates. (a)Gate output sourcing current to LED (b)Gate output sinking current from LED

13 Connecting to the parallel port (2) Light-emitting diodes Dr. Gheith Abandah13

14 The PIC 16F84A parallel ports Port A – 5 Bits – RA3:RA0 – RA4/T0CKI Port B – 8 Bits – RB0/INT – RB3:RB1 – RB7:RB4: Interrupt on change Dr. Gheith Abandah14

15 Dr. Gheith Abandah15

16 Dr. Gheith Abandah16

17 Dr. Gheith Abandah17

18 Dr. Gheith Abandah18

19 Port output characteristics -1 Dr. Gheith Abandah19 VOH vs. IOH (VDD = 3V, −40 to 125◦C) R = 130 Ω

20 Port output characteristics -2 Dr. Gheith Abandah20 VOL vs. IOL (VDD = 3V, −40 to 125◦C) R = 36 Ω

21 The clock oscillator Faster clock gives faster execution, but more power consumption. The clock oscillator must give stable and accurate clock signal. Oscillator types: – Resistor–capacitor (RC) Not precise – Crystal or ceramic Precise frequency, fragile, should be near the MC Dr. Gheith Abandah21

22 Oscillator types Dr. Gheith Abandah22 (a) Resistor–capacitor (RC). (b) Crystal or ceramic

23 The 16F84A clock oscillator Types: 1)XT – crystal: 1-4 MHz 2)HS – high speed: >= 4 MHz, with ceramic resonators. 3)LP – low power: <= 200 KHz, e.g., 32.768 kHz (i.e. 2 15 ), 4)RC – resistor-capacitor Dr. Gheith Abandah23

24 (a) Crystal or ceramic, HS, XT or LP. (b) Resistor– capacitor. (c) Externally supplied clock Dr. Gheith Abandah24

25 Data Sheet Information Dr. Gheith Abandah25

26 Power Supply Dr. Gheith Abandah26 100 nF decoupling capacitor RC Oscillator

27 Dr. Gheith Abandah27 16F84A operating conditions

28 Summary – 1 The parallel port allows ready exchange of digital data between the outside world and the controller CPU. It is important to understand the electrical characteristics of the parallel port and how they interact with external elements. While there is considerable diversity in the logic design of ports, they tend to follow similar patterns. The internal circuitry is worth understanding, as it leads to effective use of ports. The 16F84A has diverse and flexible parallel ports. Dr. Gheith Abandah28

29 Summary – 2 A microcontroller needs a clock signal in order to operate. The characteristics of the clock oscillator determine speed of operation and timing stability, and strongly influence power consumption. Active elements of the oscillator are usually built in to a microcontroller, but the designer must select the oscillator type, and its frequency and configuration. A microcontroller needs a power supply in order to operate. The requirements need to be understood and must be met by a supply of the appropriate type. Dr. Gheith Abandah29


Download ppt "Parallel ports, power supply, and the clock oscillator Chapter Three Dr. Gheith Abandah1."

Similar presentations


Ads by Google