Re: Harmony - ADC setup in the Configurator for Automatic Channel Scan mode Framework 1.0
I feel you pain, what a programmer needs to do to get something running in Harmony is almost non-existent. There is a lot of info on what the Configurator adds, but very little clear info on what you, the programmer, needs to add to make it work. Here is how I figured it out for my application, and it is also a general way to figure out what the Configurator is setting up.
1.Change and generator your setting from the Configurator.
2. Compile and run the program under debug
3. pause the program.
4. Then open the Peripherals screen by selecting from the IDE menu Window>Pic Memory Views>Peripherals. This will show the registers that get set up by the Configurator.
5. Look in the datasheet so you can search for the appropriate Registers. Keep in mind that the names in the Configurator, datasheet, and the peripheral display may have slightly different names, but easy to correlate.
Another big point that got me in the beginning is that the ADC result is put into the first location of the ADC pointer, not in the location corresponding to the ADC number. So, if you have only one ADC and it is ADC3, then the value will be in the buffer at 0 offset. If you use ADC3, ADC5, and ADC7, then the results will be in the buffer location 0, 1, and 2.