robosang WROTE:Don think the code is the problem
Show us your hardware, have you downloaded the sample code into your controller?
you got it right robosang..i have mistaken the pic use for the example
and changed pic 16f877 to pic 16f877a.. now it working fine..so sorry..thanks for your help