David please post your program so we can check it.
As Bob said: Can you please post your complete project, so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.
You are blocking the preferred analog inputs of port2 with your 7-segment display.
As a first approach for a new project I let the fitter choose the pin configuration by unlocking all pins.
PS: Your indentation is bad and your commenting is even worse. I strongly suggest you to improve both ;-)
i only did that because i know that i'm allowed to do so , can you recommend any reference to know what is the preferred pins for all kinds
meaning preferred analog , digital communication etc ?
so in future i wouldn't slip in the same mistake
thanks for your support
1 of 1 people found this helpful
Just click in the .cydwr view (where you set the pins) on one of your analog input pins. In the selection window you see all the preferred pins marked in green. Yellow pins show that there are restrictions.
Another view opens when you select the "Analog" tab showing some chip internals. there you will see that for this chip the port2 pins have individual selections to the ADC block.