REM File: PCA_PWM.BAS Date: 09/08/92 REM REM /* (c) Copyright BLUE EARTH RESEARCH, MANKATO, MN 1992. */ REM /* All rights reserved. */ REM REM ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ» REM Ί GENERATE PWM USING THE PCA Ί REM ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ REM ΥΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΈ REM ³ Written By: Thomas Bachmann ³ REM ³ Blue Earth Research, Mankato, MN 56001 ³ REM ΤΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΎ REM NOTES: REM This program generates a PWM output on P1.3 using the PCA. REM The Duty Cycle is based on the analog input to ADC channel 8, REM which is connected to the Application Module's potentiometer. REM The PWM frequency is determined by the TIMER0 counter overflow. REM The period is adjustable in increments of 256 microseconds. REM The program automatically figures out the closest frequency to REM the specified value. 1 REM PCA PWM Program REM Initialize program variables 10 ADC=0FF00H : CH=15 : V=256 REM Get input to specify desired frequency 20 PRINT : INPUT "Enter Output Frequency ", FREQ 30 IF ((7800