gnupic: TMR1H:TMR1L dont's clear


Previous by date: 4 Feb 2007 07:41:16 +0000 Re: [gnupic] gpsim --"invalid file register" error, Robert Pearce
Next by date: 4 Feb 2007 07:41:16 +0000 Re: [gnupic] gpsim --"invalid file register" error, Ralph Corderoy
Previous in thread:
Next in thread:

Subject: TMR1H:TMR1L dont's clear
From: "Nestor A. Marchesini" ####@####.####
Date: 4 Feb 2007 07:41:16 +0000
Message-Id: <45C58F4F.3080601@xinet.com.ar>

Simulating a routine that uses timer1 of 16F873 I meet an bad behavior.

      movlw   B'00000100'
      movwf   T1CON
      clrf    TMR1H
      clrf    TMR1L
      bsf     T1CON,TMR1ON     
      bsf     STATUS,RP0
      bsf     PIE1,TMR1IE
      bcf     STATUS,RP0
      bcf     PIR1,TMR1IF
      bsf     INTCON,PEIE
      bsf     INTCON,GIE
      btfss   INTCON,GIE
      goto    $ - 2
      ...
      ...
      bcf     T1CON,TMR1ON
      movf    TMR1H,W
      movwf   RegM
      movf    TMR1L,W
      movwf   RegL
      clrf    TMR1H
      clrf    TMR1L
      bsf     T1CON,TMR1ON

I turn off the TMR1, save the current count, erase the registers 
TMR1H:TMR1L and turn on the count...
but, hoo..return the previous values to the registers TMR1H:TMR1L.
I have tried in MPLAB and this does not happen.

Regards

NĂ©stor A. Marchesini
Chajari-Entre Rios-Argentina
ICQ # 50983752 colo
MSN ####@####.####
####@####.####
####@####.####
http://www.deselectronica.com.ar



Previous by date: 4 Feb 2007 07:41:16 +0000 Re: [gnupic] gpsim --"invalid file register" error, Robert Pearce
Next by date: 4 Feb 2007 07:41:16 +0000 Re: [gnupic] gpsim --"invalid file register" error, Ralph Corderoy
Previous in thread:
Next in thread:


Powered by ezmlm-browse 0.20.