Question: this is what I currently have : I var BYTE: V1 VAR BYTE; V2 VAR BYTE TRISIO=%111011; GP2 SET AS CCP1 OUTPUT FOR THE PWM

 this is what I currently have : I var BYTE: V1

this is what I currently have :

I var BYTE: V1 VAR BYTE; V2 VAR BYTE TRISIO=%111011; GP2 SET AS CCP1 OUTPUT FOR THE PWM ANSEL=%001000; AN3 SET AS ANALOG INPUT CMCON0=%00000111; CIN PINS 1/0, COMPARADOR OFF, CUT OFF OSCTUNE=0: OSCCON=%01100101; 4MHZ INTERNAL OSCILLATOR CCP1CON=%00001100; PWM MODE ACTIVE HIGH DEFINE ADC_BITS 8; A/D CONFIGURATION DEFINE ADC_CLOCK 3; 500KHZ CLOCK SOURCE DEFINE SAMPLEUS 50; WAIT 50 uS AFTER ACQUISITION TIME OF 20 uS T RPT: ADCIN 3, V1; READ TRIM POT VOLTAGE ON AN3 AND STORE IT IN V1 GPIO.2=0; CLEAR GP2 FOR I=1 TO 255; LOOP HPWM 1,I,1000; VARIABLE I INCREMENTS THE DUTY CYCLE PAUSE V1; PAUSE IS CONTROLLED BY TRIM POT NEXT I; CONTINUE LOOPUNTIL I=255 FOR I=255 TO 1 STEP -1; DECREMENTING LOOP HPWM 1,I,1000; VARIABLES I DECREMENTS THE DUTY CYCLE PAUSE V1; PAUSE CONTROLED BY TRIM POT NEXT I; CONTINUE LOOP UNTIL I=0 GOTO RPT; END;

Student Assignment: develop a program to deliver an analog pulse on CCP1 every four seconds when the input GPO goes to low logic. And deliver and Analog pulse every two seconds when G goes to logic Low P1 Student Assignment: develop a program to deliver an analog pulse on CCP1 every four seconds when the input GPO goes to low logic. And deliver and Analog pulse every two seconds when G goes to logic Low P1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!