AT91SAM9260-EK Analog to Digital (A/D) conversion

Can anyone help me about this subject? I am using AT91SAM9260-EK and trying to make conversion from Analog to Digital using a potentiometer and show the result with LEDs.

I am using Eclipse + J-Link + C Programming.

I have an example code for this purpose however it doesn’t work and I am new to that technology. I am trying to re-write the code however it is complicated for me…I am lost in the .h files.

Does any of you have any suggestion for me ? Where should I start ?

or do you have any programming examples about that ?

Thanks.