Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MFDBS 89 2nd Symposium On Mathematical Fundamentals Of Database Systems Visegrad Hungary June 26 30 1989 Proceedings

Authors: Janos Demetrovics ,Bernhard Thalheim

1989th Edition

3540512519, 978-3540512516

More Books

Students also viewed these Databases questions

Question

What are two of Kants important ideas about ethics?

Answered: 1 week ago

Question

Create a workflow analysis.

Answered: 1 week ago