Re: No program response, including config instructions
#CONFIG
cfg1 = _INTOSCIO
cfg1 = cfg1 & _WDT_OFF
cfg1 = cfg1 & _PWRTE_ON
cfg1 = cfg1 & _MCLRE_OFF
cfg1 = cfg1 & _CP_OFF
cfg1 = cfg1 & _BOD_ON
cfg1 = cfg1 & _IESO_OFF
cfg1 = cfg1 & _FCMEN_OFF
dgg1 = cfg1 & INTOSC this will never compile
__config cfg1
#ENDCONFIG
that's PulsPin =1 for 50000uS an 0 for maybe 2uS , somehow I doubt that's your intent
MainLoop:
' Turn PulsPin On
PulsePin = 1
' Pause
PAUSE 50
' PulsePin Off
PulsePin = 9
' Back to MainLoop
GOTO MainLoop
try this , I have removed all the code and comments that serve no purpose
Code:
' Hardware :
'
' Target PIC : 12F683
' Outputs
' Pulse pin GPIO.5
#CONFIG
cfg1 = _INTOSCIO
cfg1 = cfg1 & _WDT_OFF
cfg1 = cfg1 & _PWRTE_ON
cfg1 = cfg1 & _MCLRE_OFF
cfg1 = cfg1 & _CP_OFF
cfg1 = cfg1 & _BOD_ON
cfg1 = cfg1 & _IESO_OFF
cfg1 = cfg1 & _FCMEN_OFF
__config cfg1
#ENDCONFIG
DEFINE NO_CLRWDT 1 'Forces manual use of CLRWDT since you have wdt is turned off in config
DEFINE OSC 8 ;missing
' Define oscillator configuration 8MHz internal bits 6-4 = 111
OSCCON = $70
' All comparators off - Bits 0-2 111
CMCON0 = 7
' Set all pins digital
ANSEL = 0
' Set TRISIO and outputs to 0 on boot
GPIO = 0
TRISIO = %011111 ; gpio.5 o/p the rest are i/p since only gpio.5 used
' ************************************************** ****************************
' Variables etc
' Alias's and variables
PulsePin VAR GPIO.5 ' Output
' ************************************************** ***************************
' Main Loop
MainLoop:
' Turn PulsPin On
PulsePin = 1
' Pause
PAUSE 50
' PulsePin Off
PulsePin = 0
PAUSE 50 ; I believe to be missing
' Back to MainLoop
GOTO MainLoop
'************************************************* ***************
End
Warning I'm not a teacher
Bookmarks