Searching \ for '[PIC]: help...TMR0 interupt' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'help...TMR0 interupt'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: help...TMR0 interupt'
2001\01\10@173039 by Hardware Engineering

picon face
anyone have some code that shows ALL the pieces to generate a TMR0 interupt on
rollover?

setting the registers, etc

its on a PIC16F871



____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spam_OUTlistservTakeThisOuTspammitvma.mit.edu with SET PICList DIGEST in the body


2001\01\11@090523 by Olin Lathrop

face picon face
> anyone have some code that shows ALL the pieces to generate a TMR0
interupt > on
> rollover?

Here are the relevant sections of code that runs on a 16C66:

;
;   Set up the timer 0 configuration.  This will be used to generate
;   pixel clock interrupts.
;
        dbankif option_reg
        movlw   b'10001000'
                ; 1-------  port B pullups disabled (port B used for output)
                ; -X------  RB0 interrupt edge select
                ; --0-----  timer 0 source is instruction clock
                ; ---X----  timer 0 external clock edge select
                ; ----1---  prescaler assigned to watchdog timer
                ; -----XXX  prescaler value
        movwf   option_reg
;
;   Enable interrupts.  Interrupts will be globally enabled, but the timer
;   0 interrupt is not enabled.  This will be done by the ROTATION routine
;   at the next rotation tick.
;
        dbankif tmr0
        clrf    tmr0        ;leave maximum time until next timer 0 interrupt

        dbankif intcon
        clrf    intcon      ;clear any pending interrupt flags
        bsf     intcon, gie ;globally enable interrupts

;
;   Enable the timer 0 interrupt.
;
        bsf     intcon, t0ie ;make sure timer 0 interrupts are enabled

*****************************************************************
Olin Lathrop, embedded systems consultant in Devens Massachusetts
(978) 772-3129, .....olinKILLspamspam@spam@embedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamKILLspammitvma.mit.edu


More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...