
Originally Posted by
berslan
Come on guys, did I ask such a stupid question that has to be ignored?
Hi,
Yes and No ...
If you had read your Datasheet ...you could have noticed that GP3 is not a pin like the others ...
BUT, in your favour, you are not to know how "POT" works ...
So, just remember POT needs the pin to turn from time to time into an OUTPUT ...
And this is written nowhere in the manual ...
The Proof :
Code:
POTT movwf RM1 ; Save bit mask
call HIGHT ; Set pin high to charge cap
movlw 10 ; Charge cap for 10ms
call PAUSE
movf RM1, W ; Get bit mask
iorwf INDF, F ; Set pin to input
bcf FSR, 7 ; Point to port
xorwf INDF, F ; Flip bit to low
clrf R0 ; Zero counter
clrf R0 + 1
potloop bsf FSR, 7 ; Point to TRIS
movf RM1, W ; Get bit mask
xorwf INDF, F ; Set pin to output
CLRWDT?NOP ; Discharge a little (& clear Watchdog timer)
Alain
Change pin used ... no other solution ( ... RCTime won't work either )
Bookmarks