I think I'm just going to settle with changing my OSC value. I managed to complete the code and generate my 350Hz and being able to turn it on and off. Thanks for everyones help. My code is listed below:


'device PIC12F683

OSCCON = %00100101 '250kHZ system clock
CCP1CON = %00001100 'Select PWM Mode
T2CON = %00000100 'Timer2 = ON + 1:1 prescale

PR2 = 177 'Max Value = 255 Set PWM Period for 350Hz
CCPR1L = 150 'Set PWM Duty-Cycle to 85% (177*0.85 = 150)

TRISIO.2 = 0 'GPIO.2 (GPIO.2 = Output)
TRISIO.1 = 0

PIN_VOLTAGE VAR BYTE

INPUT GPIO.1 'Button input
OUTPUT GPIO.4 'Red LED
OUTPUT GPIO.5 'Green LED

BEGIN:
ADCIN 1, PIN_VOLTAGE 'ADCIN - Button Voltage Level
IF PIN_VOLTAGE >= 163 THEN 'Voltage greater then 3.2V
GOTO TURN_OFF_PULSE
ENDIF

IF PIN_VOLTAGE <= 160 THEN 'Voltage less then 3.2V
GOTO TURN_ON_PULSE
ENDIF

TURN_ON_PULSE:
TRISIO.2 = 0 'Turn ouput pulse on - make timer an output
low GPIO.4 'Turn Red LED off
HIGH GPIO.5 'Turn Green LED on
PAUSE 32 'Wait 0.5sec
LOW GPIO.5 'Turn Green LED off
PAUSE 32 'Wait 0.5sec
GOTO BEGIN

TURN_OFF_PULSE:
TRISIO.2 = 1 'Turn output pulse off - make timer an input
HIGH GPIO.4 'Turn on Red LED
goto begin

END