Iko,
These names should already declared in your header files with their matching physical address.
You need to launch a conversion
And when the conversion is complete you can read the content of result registers.
There are two ways, by polling or by interrupt.
By polling, after starting the conversion, you wait until the Conversion Complete bit gets set and then you can read.
By interrupt, you need to configure the interrupt. When the Conversion is Complete, the ATD interrupt will be executed. In the interrupt, you ackownledge the interrupt (clear flag) and read the content of the result register.
I don't know if you are a beginner or not, so please don't be offended.
What you can do to learn how it works:
- Create a new project using Project Wizard for MC9S08GT60.
- Then, use Processor Expert and the ATD bean.
- It will create all the module initialization code and interrupt for you.
- Analyze the code and copy what you need to your existing project.
Many members reporting doing this way to be sure not to forget anything when they start with a module.
That should help you.
Cheers,
Alban.