Vicky WROTE:how can i program so that 16F887 can do two task at the same time?
such as i want LED1 and LED2 at sk40c blinking,
while LED1-LED6 on another circuit do chase blink.
anyone can help?
i think it is about interrupt, isn't it?
this is my code.
i fail to do it.
To do the above job you need to set up a timer to generate an interrupt every 50 mS. I am not good in explaining the concept of how it works. SO it would be better if you get the information elsewhere on the net

To learn how interrupt works on PIC, you can google using "Interrupt on PIC" on the net and find out how other people write programs using interrupt. You can also read the datasheets on the chapter on "Interrupt" on older chips like 16F628. I found out that newer datasheets had taken out the chapter on this subject and spread them out bit by bit on other chapters.
You can also go to main microchip website and search for Application Notes that describe how Interrupt was used. After you understand about Interrupt, then you can try to write your own program to do 2 tasks at the same time...

Allen