Experiment_20_PIC - Basic Microprocessors Operations MCU...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Basic Microprocessor’s Operations: MCU for Dummies’ 1. Objective of Experiment This experiment aims to help understand how a microprocessor works, by implementing simple applications using the PIC16F84, a single chip microprocessor in the PIC family of controllers, produced by Microchip Technology. 2. Example Applications 2.1. LED Control Program Using the PIC16F84 microcontroller, a simple control program to enable or disable the LEDs (light- emitting diodes) is written and the corresponding circuit is constructed. Throughout this exercise with regard to software and hardware building, the development environment of the PICs, the way to use the assembler and the ROM writer, and the basic circuit construction of the PIC16F84 processor can be understood. 2.2. Digital Dice A device for showing numerical information on the 7-segment LED display is developed using the PIC16F84. Here, a switch is used as the device’s input component and a group of seven LEDs as the output component. Although the ultimate device to develop is a digital dice, a device simply displaying a given number on the seven LEDs when the switch is ‘closed’ is implemented first, so that one can quickly learn how to control the 7-segment LED display. After this, a digital dice that displays in random the number from 1 to 6 on the 7-segment LEDs is built. 3. Experiment Equipments and Parts 3.1. LED Control Program PC, Breadboard, Power Supply, ROM Writer, PIC16F84, Crystal Oscillator (4MHz), Switch, LEDs, Resistors (330 , 10K ) 3.2. Digital Dice PC, Breadboard, Power Supply, ROM Writer, PIC16F84, Crystal Oscillator (4MHz), Switch, 7-segment LED, Resistors (330 , 2.2K , 10K )
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
4. Theoretical Background 4.1. LED Control Program 4.1.1 Pull-up Resistor In this experiment, a pull-up resistor is used in the switch input circuit. Three types of the switch input circuit are presented from Figure 4.1.1 to Figure 4.1.3, for the purpose of showing why a pull-up resistor is necessary. First of all, suppose an input circuit as shown in Figure 4.1.1. This is an incomplete circuit because the state (‘high’ or ‘low’) of the device is not clearly determined when the switch is ‘open’, while its state is confirmed ‘low’ when the switch is ‘closed’. To solve this problem, the circuit in Figure 4.1.2 can be considered. Now, the state is clearly ‘high’ when the switch is ‘open’, but shorts arise when the switch is ‘closed’ as VCC (power) is directly connected to GND (ground). Eventually, Figure 4.1.3 presents the third type of switch input circuit that uses a pull-up resistor in order to prevent shorts and to ensure that inputs to logic systems settle at expected logic levels if devices are disconnected. In this circuit, the state is ‘low’ when the switch is ‘closed’ (ON) , and ‘high’ with the switch ‘open’ (OFF).
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 23

Experiment_20_PIC - Basic Microprocessors Operations MCU...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online