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. Josh -- A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. -Douglas Adams > Josh Koffman wrote: On 2/24/06, delly sunny wrote: > > I would like to design a 1ms delay using timer interrupt. I have selected PIC12F508/509. However, my codes are not working. could anyone help me to point out my mistake? thank you very much! > > Define not working. Is the interval wrong? Are you never getting the > interrupt? What is happening? -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist