Oops. I just checked the datasheet and I told a big lie :-( Sorry about that. This is what I get for trying to help. > > Hi everyone, > > > > Need some help on the source code below. Basically i need to implement > > a counter using the Timer0. I am using a 16F84A and i disabled the > > watchdog. I am assigning the ratio 1:256 for the prescaler and > > i am using additional 2 counters. > > > > ; source codes > > > > MAIN < some operation > > > > > bank1 > > bsf OPTREG,RBPU > > bsf OPTREG,INTEDG > > Shouldn't you be switching back to bank0 here???? INTCON is in > bank0 > > > bcf INTCON,INTF > > bsf INTCON,INTE > > bsf INTCON,GIE > > > > LOOP sleep ; let IRQ wake it up and determine functions > > Hope this helps > > mike > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu