I am trying to run the ADCC Circular example that comes as an example but the results I am getting are not what I am expecting. The only modifications to the code I have made are changing the Event Control Word in the EventCFG to 0x4D to select the exposed analog input on the board. (I ordered the analog expansion kit but it has not yet arrived). I have the jumpers for selecting the voltage reference in the default positions so internal vref is expected which should be in line the example. I am using a dc power supply a constant voltage which I connected to the SMA connector for ADC0 VIN04. I checked the connections to ground and the voltage when connected and everything seems good. The code compiles and runs fine and no errors are flagged, but the sample buffer always contains a very similar set of values no matter what the input voltage is, even if nothing is connected.
Here is what it looks like. It hovers around those values for the rest of the samples. Seems to read what would be ~0.1v if it was reading correctly. If I select other ADC channels they behave similarly though with different numbers depending on the channel. Channel 0 is the only channel that fills it with 0's as you would expect when nothing is connected. They seem to have higher readings the higher channel I select. I've tried using the external voltage reference and switching the jumpers and configuring the ADC to use that external reference but the results were exactly the same. Any help would be much appreciated.
I am using IAR 9.50.2 with the latest version of the enablement package 2.3.1.