So, here's the code:
Code:
' Fuses
@ DEVICE PIC12F683,FCMEN_OFF
@ DEVICE PIC12F683,IESO_OFF
@ DEVICE PIC12F683,BOD_OFF
@ DEVICE PIC12F683,CPD_OFF
@ DEVICE PIC12F683,PROTECT_OFF
@ DEVICE PIC12F683,MCLR_OFF
@ DEVICE PIC12F683,WDT_OFF
@ DEVICE PIC12F683,INTRC_OSC_NOCLKOUT
'-------------------------------------------------------------------------------
' Registers 76543210
ANSEL = %00000000 'Disable analog inputs
ADCON0 = %00000000 'ADC is OFF
CMCON0 = %00000111 'Comparator is OFF
OPTION_REG = %10000000 'Pull-Ups disabled...
TRISIO = %00000000 'All PORTBs are Outputs
GPIO = %00000000 'All PORTBs are Low
'-------------------------------------------------------------------------------
' Defines
'-------------------------------------------------------------------------------
' Variables
'-------------------------------------------------------------------------------
' Program
MAIN:
PWM GPIO.2,64,1000
goto main
end
And here is how the oscillo is set:
<img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1649&stc=1&d=117941075 3">
Bookmarks