never saw that
I went by the directions you posted but the file I had to copy n paste as it was in the win notepad.
after pasting I highlighted the then clicked on quickbuild and go a succesful build as per
How to create a HEX file using MPLAB IDE
question can I connect a speaker to con5 and build the code you posted (I think you posted??) will it work maybe??
}
{
*****************************************************************************
* Name : UNTITLED.BAS *
* Author : [select VIEW...EDITOR OPTIONS] *
* Notice : Copyright (c) 2009 [select VIEW...EDITOR OPTIONS] *
* : All Rights Reserved *
* Date : 3/31/2009 *
* Version : 1.0 *
* Notes : hook your sound up from PORTB.3 *
* : *
*****************************************************************************
}
Device = 18F1320
Clock = 8 // tells the compiler the FOSC speed
Config OSC = INTIO2, WDT = OFF, LVP = OFF
Include "Utils.bas"
Include "PW.bas" // import PWM module..
Dim Duty As Byte
OSCCON = %01111111 // select 8MHz internal oscillator
SetAllDigital
// main program...
PWM.SetFreq(5000) //this set it for a 5000khz
While true
Duty = 40 // this starts it at 2000khz
Repeat
PWM.SetDutyPercent(Duty)
Inc(Duty)
DelayMS(25)
Until Duty > 100 // takes it up to 5000
Repeat
PWM.SetDutyPercent(Duty)
Dec(Duty)
DelayMS(25)
Until Duty = 40 // lower it back down
Wend