zizouali:
thank you very much ill try to update my mpide but firstly can you tell me what's the AVR code because im a little beginner in programming
Seriously, look for Chipkit examples. If you are a beginner it is like trying to learn to fly a plane with a German instructor, when you don't speak German.