This is a really long shot, but here goes.
I am working on a lab. It is a school assignment. We are working on creating a simple C program that is downloaded to a Dragon12 Development Board. The program runs on the HCS12 microprocessor.
The point of the lab is to read in an analog signal, and display it's value on a seven segment display.
To do this you have to set a number of control registers, and configure the board so that the ATD works properly and samples at a reasonable rate. Enable the ATD, and finally capture input every time an interrupt is triggered (again by reading some more registers). Probably there's some special cleanup you have to do in the interrupt as well to prepare for another read.
Most of the code I have done. I can download programs to the board, I can access the registers by name, I know how to hook into interrupts on the board and setup interrupt service routines.
What I don't understand is just the idea of how this particular microcontroller / development board uses the ATD. What's the process by which the data flows from it's analog state, to an appropriate variable in my program? The documentation is very cryptic.
Any help before Monday would be greatly appreciated.
Some reference material:
Picture of a Dragon12 Development Board:
ATD Block User Guide (specific info on the registers related to the ATD)
HCS12 Block Diagram (note the ATD0 and ATD1 blocks, those are the magic components)
HCS12 Microprocessor Complete Documentation:
Example code that may or may not work: