At 09:04 AM 2/26/2006 -0500, you wrote: >On 2/26/06, delly sunny wrote: > > Thank you very much for your reply. The similar code will trigger > an 'overflow' bit when using other chips, such as PIC16F874. However, > in PIC12F509, there is no such overflow bit. Therefore I am not able to > detect when the counter get the number I pre-defined. I am very new to > microchip. Hope you understand and really appreciate if you could give > me more hint on it. Thanks. > >I've never used a 12F509, but I would guess that if you're using a >timer interrupt there should be an interrupt flag that's set when the >timer overflows. I would recommend reading the datasheet for that chip >(available at http://www.microchip.com) to find out more. There are *no* interrupts in the 12F509, primitive beast that it is. I think he'll have to do something like have the program sit and wait for the timer to finish, or check and see if the timer has rolled over by looking to see if the MSB has gone 1->0 (but of course you must check frequently enough to ensure that you don't miss anything important). >Best regards, Spehro Pefhany --"it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com ->> Inexpensive test equipment & parts http://search.ebay.com/_W0QQsassZspeff -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist