Lab Four Lab04 Instructions
User Manual:
Open the PDF directly: View PDF
.
Page Count: 1
| Download | |
| Open PDF In Browser | View PDF |
Spring 2018 Lab 4 Instructions Context Saving, Pulse Width Modulation, CCP Compare Function This lab familiarizes the student with context saving, pulse width modulation (PWM), and the compare feature of the CCP module of the PIC. The hardware layout is the same as in Lab 2 and Lab 3. 1. Create a project using the lab04a.asm file from the course website. Connect a potentiometer to ADC channel 0 so that you can adjust the input voltage between 0 and 5 volts. Connect LEDs to the PORTC pins. Run the program and turn the pot. Notice how the LEDs get dimmer and brighter as you adjust the pot. This effect is a result of modulating the pulse width of the PORTC PWM output voltage. 2. Create a project using the lab04b.asm file. Connect an active low switch to RB0. Lab04b is a modification of lab04a so that when you press the RB0 switch, the LEDs toggle on and off. Run the program. The pot still controls the intensity of the LEDs when they are on. The RB0 interrupt is set up as a rising edge interrupt, and RB0 is active low, so the LEDs toggle when you release the RB0 button. Lab04b.asm also illustrates how multiple interrupts are handled. 3. Create a project using the lab04c.asm file. This program uses the CCP1 interrupt to toggle the RC2 output, which you should connect to an LED. Run the program and notice that the LED is blinking because of CCP1 interrupts. Page 1 of 1
Source Exif Data:
File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.5 Linearized : Yes Author : Dan Simon Company : Create Date : 2018:02:20 02:23:51-05:00 Modify Date : 2018:02:20 02:23:52-05:00 Source Modified : D:20180220072327 Subject : Language : EN-US Tagged PDF : Yes XMP Toolkit : Adobe XMP Core 5.4-c006 80.159825, 2016/09/16-03:31:08 Metadata Date : 2018:02:20 02:23:52-05:00 Creator Tool : Acrobat PDFMaker 11 for Word Document ID : uuid:67d1aa46-3bd2-4c20-9a51-b3a01f7fc4c5 Instance ID : uuid:f27cab11-0bab-4565-b691-ce784f1d85be Format : application/pdf Title : Lab Four Description : Creator : Dan Simon Producer : Adobe PDF Library 11.0 Keywords : Page Layout : OneColumn Page Count : 1EXIF Metadata provided by EXIF.tools