Dear colleagues,
I work with ICE2000 (pcm16xa0 & dva12xp80) to emulate PIC12C508A. I've experienced with a very strange problem: after the chip goes to SLEEP, the WDT Reset occures (STATUS = 0 on Reset), whereas it should be only Wake up from sleep !
__CONFIG _CP_OFF & _WDT_ON & _MCLRE_ON & _IntRC_OSC
START movwf OSCCAL ; update register with factory cal value ; ========================================================================== movlw 0x0f ; Select internal RC,enable pull-ups ; assign prescaller 1:128 to WDT,Wake Up on change option ;
;===========================================================================
movlw 0xEF ; tris GPIO ; Set GP4[Relay] to output direction
LOOP
sleep btfsc GPIO,0 ; Has the DATA_PIN fallen down ? goto LOOP ; No, it is High movlw ...
I've tried this code only with ICE, since currently I haven't possibility to burn a real chip.So, perhaps the problem exists only when working with ICE ?
Thank you in advance, Eli.