Have trouble using TMR0 for a project. We we set the Timer witha prescar of 1:256 and sotre decimal vale of 252 in TMR0 to have it interupt every microsecond. I am having trouble getting it to start here is the initialization code:
TMR0Setup
bcf STATUS, RP1
bcf STATUS, RP0
movlw b'00100111' ;sets prescalar (1:256)
movwf OPTION_REG
movlw b'10100000'
movwf INTCON ;enables Gloabal and timer0 interruputs
call ResetTimer0
ResetTimer0
movlw d'250'
movwf TMR0 ;puts decimal 252 into timer register
bcf INTCON, TMR0IF ;clears the interrupt flag
return
TMR0 does not increment, any suggestions?
TMR0Setup
bcf STATUS, RP1
bcf STATUS, RP0
movlw b'00100111' ;sets prescalar (1:256)
movwf OPTION_REG
movlw b'10100000'
movwf INTCON ;enables Gloabal and timer0 interruputs
call ResetTimer0
ResetTimer0
movlw d'250'
movwf TMR0 ;puts decimal 252 into timer register
bcf INTCON, TMR0IF ;clears the interrupt flag
return
TMR0 does not increment, any suggestions?