Menu

#55 TMR1 not getting cleared

closed-fixed
None
5
2009-05-04
2007-02-05
No

On behalf of Nestor Marchesini (as reported on the gnupic mailing list).

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 nestorm_des@hotmail.com
nestorm@xinet.com.ar
nestorm@deselectronica.com.ar
http://www.deselectronica.com.ar

Discussion

  • Robert Pearce

    Robert Pearce - 2008-05-18

    Logged In: YES
    user_id=481175
    Originator: NO

    At a quick glance this looks likely to be the same bug as 1811305

     
  • Robert Pearce

    Robert Pearce - 2008-05-18

    Logged In: YES
    user_id=481175
    Originator: NO

    I can re-create this on 0.22 but not on the latest SVN, so it looks like it's been fixed.

     
  • Roy Rankin

    Roy Rankin - 2009-05-04

    closing on basis of bdt-robs testing

     
  • Roy Rankin

    Roy Rankin - 2009-05-04
    • status: open --> closed-fixed
     

Anonymous
Anonymous

Add attachments
Cancel