i solved... the problem was from CONFIG . MCLRE must be off and measured pulse is in 10us.
#CONFIG
__config _INTRC_OSC_NOCLKOUT & _WDT_OFF & _MCLRE_OFF & _CP_OFF
#ENDCONFIG
ansel = 0
wpu = 0
cmcon0 = 7
signal var word
main:
pulsin gpio.3,1,signal
if signal > 160 then high gpio.0
goto main
end
Bookmarks