Ok I'm loosing my mind here!
The code below works fine sorta.
Whats happening is I compiled it and have a hex file. I load it into flash kit starter, came with my pic kit V1Code:@ __CONFIG _INTRC_OSC_NOCLKOUT & _WDT_ON & _PWRTE_ON & _MCLRE_OFF & _BODEN_ON DEFINE OSCCAL_1K 1 INCLUDE "modedefs.bas" TRISIO.0 = 0 'Set GPIO.0 to output. ANSEL = 0 'disable ADCs CMCON = 7 'disable comparator T1CON = %00000110 ANSEL.1 = 0 'Set GPIO.1 to digital Pulselen Var byte ValidCode Var byte I var byte clear goto main Main: validcode=200 If validcode=200 then for I = 1 to 20 Pulsout GPIO.0, 200 next I endif validcode=0 goto main
I burn a chip
12F675 and half the time it sends out a .005ms pulse instead of a 2 ms pulse.
If I take the same chip reburn it, it works maybe if not reburn it and it works...
What am I doing wrong here that sometimes works perfectly and others not? I'm using the same hex file...
Any ideas?




Bookmarks